<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="css/webEditor.css" type="text/css" rel="stylesheet"/>
<base target="_self"/>
<title>无标题文档</title>
<script language='javascript'>
function tabView(flag)
{
var tlist=document.getElementById("Editor_SellFrame_UploadImg_Title").getElementsByTagName("li")
var clist=document.getElementById("Editor_SellFrame_UploadImg_Cont").getElementsByTagName("table")
for(var i=0;i<tlist.length;i++)
{
tlist[i].className=(i==flag-1)?"Editor_SellFrame_UploadImg_Title_dis":"Editor_SellFrame_UploadImg_Title_undis"
clist[i].className=(i==flag-1)?"Editor_SellFrame_UploadImg_Cont_dis":"Editor_SellFrame_UploadImg_Cont_undis"
}
tlist[flag-1].getElementsByTagName("a")[0].blur()
}
function removeNbsp(str)
{
if(str=="") return ""
var strTemp=str
while(strTemp.charAt(0)==" " || strTemp.charAt(0)==" ")
{
strTemp=strTemp.substring(1,strTemp.length) //去掉前面的空格
}
while(strTemp.charAt(strTemp.length-1)==" " || strTemp.charAt(strTemp.length-1)==" ")
{
strTemp=strTemp.substring(0,strTemp.length-1) //去掉后面的空格
}
return strTemp
}
function checkLink(url)
{
var urlTemp=url.toLowerCase()
var reg=/^((ht)|f|(rs))tp[s]?:\/\/([a-zA-Z0-9]|[-_])+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$/
if(reg.test(url))
{
return true
}
return false
}
function insertNetImg(id)
{
var value=removeNbsp(document.getElementById(id).value)
if(value=="")
{
document.getElementById("Editor_SellFrame_UploadImg_Tip").innerHTML="请输入图片的网址!"
return
}
if(!checkLink(value))
{
document.getElementById("Editor_SellFrame_UploadImg_Tip").innerHTML="图片的网址不正确,请重新输入!"
return
}
top.window[webEditorClass].AddImage(webEditorAction,value)
}
function insertLocalImg(id)
{
var value=document.getElementById(id).src
if(value!="")
{
top.window[webEditorClass].AddImage(webEditorAction,value)
}
}
//测试用
//url传值(theName=@param&theAction=@param&thePath=@param)
var URLParams=new Object()
var url=location.href
var Temp=url.indexOf("?theName=")
if(Temp>=0)
{
if(url.length>Temp+11)
{
paramTemp=url.substr(Temp+1)
var argumentTemp=paramTemp.split("&")
for (i=0;i<argumentTemp.length;i++)
{
var aParam=argumentTemp[i].split('=')
URLParams[aParam[0]]=aParam[1]
}
}
}
//父页面webEditor实例
var webEditorClass=URLParams["theName"]
//编辑动作
var webEditorAction=URLParams["theAction"]
</script>
</head>
<body>
<div class="Editor_SellFrame_UploadImg" id="Editor_SellFrame_UploadImg">
<!--上传前-->
<ul class="Editor_SellFrame_UploadImg_Title" id='Editor_SellFrame_UploadImg_Title'>
<li class='Editor_SellFrame_UploadImg_Title_dis'><a href='javascript:void(0)' onclick='tabView(1)'>网络图片</a></li>
<li class='Editor_SellFrame_UploadImg_Title_undis'><a href='javascript:void(0)' onclick='tabView(2)'>上传图片</a></li>
</ul>
<div class='Editor_SellFrame_UploadImg_Cont' id='Editor_SellFrame_UploadImg_Cont'>
<table cellspcing='0' cellpadding='0' border='0' width='100%' class="Editor_SellFrame_UploadImg_Cont_dis">
<tr>
<td align='left' height='24px'>图片网址:</td>
</tr>
<tr>
<td align='left' height="32px"><input type='text' class='Editor_SellFrame_UploadImg_Cont_Txt' id='Editor_SellFrame_UploadImg_Cont_Txt' size='28'/><td>
</tr>
<tr>
<td align='left' height="32px"><a href='javascript:void(0)' onclick='insertNetImg("Editor_SellFrame_UploadImg_Cont_Txt")' class='Editor_SellFrame_UploadImg_Cont_Link' >插入图片</a></td>
</tr>
<tr>
<td><div class="Editor_SellFrame_UploadImg_Tip" id="Editor_SellFrame_UploadImg_Tip"></div></td>
<tr>
</table>
<table cellspcing='0' cellpadding='0' border='0' width='100%' class="Editor_SellFrame_UploadImg_Cont_undis">
<tr>
<td align='left' height='24px'>选择上传图片:</td>
</tr>
<tr>
<td align='left' height="32px"><input type='file' class='Editor_SellFrame_UploadImg_Cont_File' size='28' id='Editor_SellFrame_UploadImg_Cont_File'/><td>
</tr>
<tr>
<td align='left' height="32px"><input type='button' class='Editor_SellFrame_UploadImg_Cont_Button' value='上传图片' /></td>
</tr>
<tr>
<td><div class="Editor_SellFrame_UploadImg_Tip" id="Editor_SellFrame_UploadImg_Tip2"></div></td>
<tr>
</table>
</div>
<!--上传前-->
<!--上传中
<div class="Editor_SellFrame_UploadImg_Uploading">正在上传文件,请稍候......</div>
上传中-->
<!--上传后
<table cellspcing='0' cellpadding='0' border='0' width='100%'>
<tr>
<td align='left' height='24px'>己上传图片:</td>
</tr>
<tr>
<td align='left'><div clss="Editor_SellFrame_UploadImg_Imgbox" id="Editor_SellFrame_UploadImg_Imgbox"><img id='Editor_SellFrame_UploadImg_ImgPath' src="http://eiv.baidu.com/mc_files/20091022/20091022183658_79324200T1T396485.jpg" /></div></td>
</tr>
<tr>
<td align='left' height="32px"><a href='javascript:void(0)' onclick='insertLocalImg("Editor_SellFrame_UploadImg_ImgPath")' class='Editor_SellFrame_UploadImg_Cont_Link' >插入图片</a></td>
</tr>
</table>
上传后-->
</div>
</body>
</html>
没有合适的资源?快使用搜索试试~ 我知道了~
网页文本编辑器,非常方便,纯中文版

共398个文件
gif:318个
jpg:54个
db:12个


温馨提示
网页文本编辑器,非常方便,纯中文版 使用方便,是我们的宗旨。
资源推荐
资源详情
资源评论






















收起资源包目录





































































































共 398 条
- 1
- 2
- 3
- 4
资源评论

- HeraLu2014-06-25用作参考,补评

chen_xiangguo
- 粉丝: 40
- 资源: 18
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


会员权益专享
安全验证
文档复制为VIP权益,开通VIP直接复制
