@@ -1,3 +1,3 @@ | |||||
function CheckSubmit(){ | |||||
function CheckSubmit() { | |||||
return true; | return true; | ||||
} | } |
@@ -1,13 +1,11 @@ | |||||
function selAll() | |||||
{ | |||||
function selAll() { | |||||
var celements = document.getElementsByName('aids[]'); | var celements = document.getElementsByName('aids[]'); | ||||
for (i=0;i<celements.length;i++) { | for (i=0;i<celements.length;i++) { | ||||
if (!celements[i].checked) celements[i].checked = true; | if (!celements[i].checked) celements[i].checked = true; | ||||
else celements[i].checked = false; | else celements[i].checked = false; | ||||
} | } | ||||
} | } | ||||
function noselAll() | |||||
{ | |||||
function noselAll() { | |||||
var celements = document.getElementsByName('aids[]'); | var celements = document.getElementsByName('aids[]'); | ||||
for (i=0;i<celements.length;i++) { | for (i=0;i<celements.length;i++) { | ||||
if (celements[i].checked = true) { | if (celements[i].checked = true) { | ||||
@@ -16,8 +14,7 @@ function noselAll() | |||||
} | } | ||||
} | } | ||||
//批量删除搜多关键字 | //批量删除搜多关键字 | ||||
function delall() | |||||
{ | |||||
function delall() { | |||||
DedeConfirm("您确定要删除选定的关键字吗").then((v)=>{ | DedeConfirm("您确定要删除选定的关键字吗").then((v)=>{ | ||||
document.form3.dopost.value = 'delall'; | document.form3.dopost.value = 'delall'; | ||||
document.form3.submit(); | document.form3.submit(); | ||||
@@ -39,8 +39,7 @@ function adArc(aid) { | |||||
if (aid==0) aid = getOneItem(); | if (aid==0) aid = getOneItem(); | ||||
location="archives_do.php?aid="+aid+"&dopost=commendArchives&qstr="+qstr; | location="archives_do.php?aid="+aid+"&dopost=commendArchives&qstr="+qstr; | ||||
} | } | ||||
function cAtts(jname, e, obj) | |||||
{ | |||||
function cAtts(jname, e, obj) { | |||||
var qstr=getCheckboxItem(); | var qstr=getCheckboxItem(); | ||||
var screeheight = document.body.clientHeight + 20; | var screeheight = document.body.clientHeight + 20; | ||||
if (qstr=='') { | if (qstr=='') { | ||||
@@ -55,14 +54,12 @@ function delArc(aid) { | |||||
if (aid==0) aid = getOneItem(); | if (aid==0) aid = getOneItem(); | ||||
location="archives_do.php?qstr="+qstr+"&aid="+aid+"&dopost=delArchives"; | location="archives_do.php?qstr="+qstr+"&aid="+aid+"&dopost=delArchives"; | ||||
} | } | ||||
function QuickEdit(aid, e, obj) | |||||
{ | |||||
function QuickEdit(aid, e, obj) { | |||||
LoadQuickDiv(e, 'archives_do.php?dopost=quickEdit&aid='+aid+'&rnd='+Math.random(), 'quickEdit', 'auto', '300px'); | LoadQuickDiv(e, 'archives_do.php?dopost=quickEdit&aid='+aid+'&rnd='+Math.random(), 'quickEdit', 'auto', '300px'); | ||||
ChangeFullDiv('show'); | ChangeFullDiv('show'); | ||||
} | } | ||||
//获得选中文件的文件名 | //获得选中文件的文件名 | ||||
function getCheckboxItem() | |||||
{ | |||||
function getCheckboxItem() { | |||||
var allSel=""; | var allSel=""; | ||||
if (document.form2.arcID.value) return document.form2.arcID.value; | if (document.form2.arcID.value) return document.form2.arcID.value; | ||||
for (i=0;i<document.form2.arcID.length;i++) { | for (i=0;i<document.form2.arcID.length;i++) { | ||||
@@ -76,8 +73,7 @@ function getCheckboxItem() | |||||
return allSel; | return allSel; | ||||
} | } | ||||
//获得选中其中一个的id | //获得选中其中一个的id | ||||
function getOneItem() | |||||
{ | |||||
function getOneItem() { | |||||
var allSel=""; | var allSel=""; | ||||
if (document.form2.arcID.value) return document.form2.arcID.value; | if (document.form2.arcID.value) return document.form2.arcID.value; | ||||
for (i=0;i<document.form2.arcID.length;i++) { | for (i=0;i<document.form2.arcID.length;i++) { | ||||
@@ -88,8 +84,7 @@ function getOneItem() | |||||
} | } | ||||
return allSel; | return allSel; | ||||
} | } | ||||
function selAll() | |||||
{ | |||||
function selAll() { | |||||
if (typeof document.form2.arcID.length === "undefined") { | if (typeof document.form2.arcID.length === "undefined") { | ||||
document.form2.arcID.checked = true; | document.form2.arcID.checked = true; | ||||
} | } | ||||
@@ -99,8 +94,7 @@ function selAll() | |||||
} | } | ||||
} | } | ||||
} | } | ||||
function noSelAll() | |||||
{ | |||||
function noSelAll() { | |||||
if (typeof document.form2.arcID.length === "undefined") { | if (typeof document.form2.arcID.length === "undefined") { | ||||
document.form2.arcID.checked = false; | document.form2.arcID.checked = false; | ||||
} | } | ||||
@@ -8,8 +8,7 @@ function delArc(mid) { | |||||
location="member_do.php?id="+qstr+"&dopost=delmembers"; | location="member_do.php?id="+qstr+"&dopost=delmembers"; | ||||
} | } | ||||
//获得选中文件的文件名 | //获得选中文件的文件名 | ||||
function getCheckboxItem() | |||||
{ | |||||
function getCheckboxItem() { | |||||
var allSel=""; | var allSel=""; | ||||
if (document.form2.mid.value) return document.form2.mid.value; | if (document.form2.mid.value) return document.form2.mid.value; | ||||
for (i=0;i<document.form2.mid.length;i++) { | for (i=0;i<document.form2.mid.length;i++) { | ||||
@@ -23,8 +22,7 @@ function getCheckboxItem() | |||||
return allSel; | return allSel; | ||||
} | } | ||||
//获得选中其中一个的id | //获得选中其中一个的id | ||||
function getOneItem() | |||||
{ | |||||
function getOneItem() { | |||||
var allSel=""; | var allSel=""; | ||||
if (document.form2.mid.value) return document.form2.mid.value; | if (document.form2.mid.value) return document.form2.mid.value; | ||||
for (i=0;i<document.form2.mid.length;i++) { | for (i=0;i<document.form2.mid.length;i++) { | ||||
@@ -35,8 +33,7 @@ function getOneItem() | |||||
} | } | ||||
return allSel; | return allSel; | ||||
} | } | ||||
function selAll() | |||||
{ | |||||
function selAll() { | |||||
if (typeof document.form2.mid.length === "undefined") { | if (typeof document.form2.mid.length === "undefined") { | ||||
document.form2.mid.checked = true; | document.form2.mid.checked = true; | ||||
} | } | ||||
@@ -46,8 +43,7 @@ function selAll() | |||||
} | } | ||||
} | } | ||||
} | } | ||||
function noSelAll() | |||||
{ | |||||
function noSelAll() { | |||||
if (typeof document.form2.mid.length === "undefined") { | if (typeof document.form2.mid.length === "undefined") { | ||||
document.form2.mid.checked = false; | document.form2.mid.checked = false; | ||||
} | } | ||||
@@ -1,4 +1,4 @@ | |||||
function SelectImage(sform,stype) { | |||||
function SelectImage(sform, stype) { | |||||
let s = sform.split("."); | let s = sform.split("."); | ||||
if (s.length === 2) { | if (s.length === 2) { | ||||
let frm = document.getElementsByName(s[0]); | let frm = document.getElementsByName(s[0]); | ||||
@@ -1,6 +1,5 @@ | |||||
//选择地区的二级分类 | //选择地区的二级分类 | ||||
function selNext(oj, v) | |||||
{ | |||||
function selNext(oj, v) { | |||||
var newobj = oj.options; | var newobj = oj.options; | ||||
var selv = parseInt(v); | var selv = parseInt(v); | ||||
var maxv = parseInt(v) + 500; | var maxv = parseInt(v) + 500; | ||||
@@ -30,8 +29,7 @@ function selNext(oj, v) | |||||
} | } | ||||
} | } | ||||
//子类改变事件 | //子类改变事件 | ||||
function ChangeSon() | |||||
{ | |||||
function ChangeSon() { | |||||
//由于支持3级联动,所以这里需要对自己改变进行重构 | //由于支持3级联动,所以这里需要对自己改变进行重构 | ||||
var emname = this.name.replace('_son', ''); | var emname = this.name.replace('_son', ''); | ||||
if (document.getElementById(emname+'_sec')) { | if (document.getElementById(emname+'_sec')) { | ||||
@@ -78,8 +76,7 @@ function ChangeSon() | |||||
else document.getElementById('span_'+emname+'_sec').innerHTML = ""; | else document.getElementById('span_'+emname+'_sec').innerHTML = ""; | ||||
} | } | ||||
//改变第三级的事件 | //改变第三级的事件 | ||||
function ChangeSec() | |||||
{ | |||||
function ChangeSec() { | |||||
var emname = this.name.replace('_sec', ''); | var emname = this.name.replace('_sec', ''); | ||||
var topSelObj = document.getElementById(emname+'_top'); | var topSelObj = document.getElementById(emname+'_top'); | ||||
if (this.options[this.selectedIndex].value==0) { | if (this.options[this.selectedIndex].value==0) { | ||||
@@ -89,8 +86,7 @@ function ChangeSec() | |||||
} | } | ||||
} | } | ||||
//顶级类改变事件 | //顶级类改变事件 | ||||
function selNextSon() | |||||
{ | |||||
function selNextSon() { | |||||
var emname = this.name.replace('_top', ''); | var emname = this.name.replace('_top', ''); | ||||
if (document.getElementById(emname+'_son')) { | if (document.getElementById(emname+'_son')) { | ||||
var oj = document.getElementById(emname + '_son'); | var oj = document.getElementById(emname + '_son'); | ||||
@@ -132,8 +128,7 @@ function selNextSon() | |||||
document.getElementById('span_'+emname+'_son').appendChild(oj); | document.getElementById('span_'+emname+'_son').appendChild(oj); | ||||
} | } | ||||
//根据数组生成多级联动菜单 | //根据数组生成多级联动菜单 | ||||
function MakeTopSelect(emname, selvalue) | |||||
{ | |||||
function MakeTopSelect(emname, selvalue) { | |||||
var selectFormHtml = ''; | var selectFormHtml = ''; | ||||
var aOption = null; | var aOption = null; | ||||
var selObj = document.createElement("select"); | var selObj = document.createElement("select"); | ||||
@@ -245,8 +240,7 @@ function MakeTopSelect(emname, selvalue) | |||||
document.getElementById('span_'+emname+'_sec').appendChild(selObj); | document.getElementById('span_'+emname+'_sec').appendChild(selObj); | ||||
} | } | ||||
//两个小数相加进度计算 | //两个小数相加进度计算 | ||||
function FloatAdd(arg1, arg2) | |||||
{ | |||||
function FloatAdd(arg1, arg2) { | |||||
var r1,r2,m; | var r1,r2,m; | ||||
try{r1=arg1.toString().split(".")[1].length}catch(e){r1=0} | try{r1=arg1.toString().split(".")[1].length}catch(e){r1=0} | ||||
try{r2=arg2.toString().split(".")[1].length}catch(e){r2=0} | try{r2=arg2.toString().split(".")[1].length}catch(e){r2=0} | ||||
@@ -254,8 +248,7 @@ function FloatAdd(arg1, arg2) | |||||
return (arg1*m+arg2*m)/m | return (arg1*m+arg2*m)/m | ||||
} | } | ||||
//清除旧对象 | //清除旧对象 | ||||
function clear(o) | |||||
{ | |||||
function clear(o) { | |||||
l=o.length; | l=o.length; | ||||
for (i = 0; i< l; i++) { | for (i = 0; i< l; i++) { | ||||
o.options[1]=null; | o.options[1]=null; | ||||
@@ -1,5 +1,4 @@ | |||||
function checkSubmit() | |||||
{ | |||||
function checkSubmit() { | |||||
if (document.form1.title.value=='') { | if (document.form1.title.value=='') { | ||||
alert("文档标题不能为空"); | alert("文档标题不能为空"); | ||||
document.form1.title.focus(); | document.form1.title.focus(); | ||||
@@ -12,15 +11,14 @@ function checkSubmit() | |||||
document.form1.imagebody.value = document.getElementById('copyhtml').innerHTML; | document.form1.imagebody.value = document.getElementById('copyhtml').innerHTML; | ||||
document.getElementById('postloader').style.display = 'block'; | document.getElementById('postloader').style.display = 'block'; | ||||
} | } | ||||
function CheckSelTable(nnum){ | |||||
function CheckSelTable(nnum) { | |||||
var cbox = document.getElementById('isokcheck'+nnum); | var cbox = document.getElementById('isokcheck'+nnum); | ||||
var seltb = document.getElementById('seltb'+nnum); | var seltb = document.getElementById('seltb'+nnum); | ||||
if (!cbox.checked) seltb.style.display = 'none'; | if (!cbox.checked) seltb.style.display = 'none'; | ||||
else seltb.style.display = 'block'; | else seltb.style.display = 'block'; | ||||
} | } | ||||
var startNum = 1; | var startNum = 1; | ||||
function MakeUpload(mnum) | |||||
{ | |||||
function MakeUpload(mnum) { | |||||
var endNum = 0; | var endNum = 0; | ||||
var upfield = document.getElementById("uploadfield"); | var upfield = document.getElementById("uploadfield"); | ||||
var pnumObj = document.getElementById("picnum"); | var pnumObj = document.getElementById("picnum"); | ||||
@@ -48,13 +46,11 @@ function MakeUpload(mnum) | |||||
upfield.innerHTML += fhtml; | upfield.innerHTML += fhtml; | ||||
} | } | ||||
} | } | ||||
function TestGet() | |||||
{ | |||||
function TestGet() { | |||||
LoadTestDiv(); | LoadTestDiv(); | ||||
} | } | ||||
var vcc = 0; | var vcc = 0; | ||||
function LoadTestDiv() | |||||
{ | |||||
function LoadTestDiv() { | |||||
var posLeft = 100; var posTop = 100; | var posLeft = 100; var posTop = 100; | ||||
var newobj = document.getElementById('_myhtml'); | var newobj = document.getElementById('_myhtml'); | ||||
document.getElementById('imagebody').value = document.getElementById('copyhtml').innerHTML; | document.getElementById('imagebody').value = document.getElementById('copyhtml').innerHTML; | ||||
@@ -88,8 +84,7 @@ function LoadTestDiv() | |||||
vcc++; | vcc++; | ||||
}) | }) | ||||
} | } | ||||
function checkMuList(psid,cmid) | |||||
{ | |||||
function checkMuList(psid, cmid) { | |||||
if (document.getElementById('pagestyle3').checked) | if (document.getElementById('pagestyle3').checked) | ||||
{ | { | ||||
document.getElementById('spagelist').style.display = 'none'; | document.getElementById('spagelist').style.display = 'none'; | ||||
@@ -102,8 +97,7 @@ function checkMuList(psid,cmid) | |||||
} | } | ||||
} | } | ||||
//图片显示与隐藏zip文件选项 | //图片显示与隐藏zip文件选项 | ||||
function ShowZipField(formitem,zipid,upid) | |||||
{ | |||||
function ShowZipField(formitem, zipid, upid) { | |||||
if (formitem.checked){ | if (formitem.checked){ | ||||
document.getElementById(zipid).style.display = 'block'; | document.getElementById(zipid).style.display = 'block'; | ||||
document.getElementById(upid).style.display = 'none'; | document.getElementById(upid).style.display = 'none'; | ||||
@@ -114,13 +108,12 @@ function ShowZipField(formitem,zipid,upid) | |||||
} | } | ||||
} | } | ||||
//图片显示与隐藏修改框 | //图片显示与隐藏修改框 | ||||
function ShowHtmlField(formitem,htmlid,upid) | |||||
{ | |||||
if ($Nav()!="IE"){ | |||||
function ShowHtmlField(formitem, htmlid, upid) { | |||||
if ($Nav()!="IE") { | |||||
alert("该方法不适用于非IE浏览器"); | alert("该方法不适用于非IE浏览器"); | ||||
return ; | return ; | ||||
} | } | ||||
if (formitem.checked){ | |||||
if (formitem.checked) { | |||||
document.getElementById(htmlid).style.display = 'block'; | document.getElementById(htmlid).style.display = 'block'; | ||||
} else { | } else { | ||||
document.getElementById(htmlid).style.display = 'none'; | document.getElementById(htmlid).style.display = 'none'; | ||||
@@ -9,7 +9,7 @@ function checkSubmit(t) { | |||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
function SelectImage(sform,stype) { | |||||
function SelectImage(sform, stype) { | |||||
let s = sform.split("."); | let s = sform.split("."); | ||||
if (s.length === 2) { | if (s.length === 2) { | ||||
let frm = document.getElementsByName(s[0]); | let frm = document.getElementsByName(s[0]); | ||||
@@ -3,8 +3,7 @@ function $DE(id) { | |||||
return document.getElementById(id); | return document.getElementById(id); | ||||
} | } | ||||
//读写cookie函数 | //读写cookie函数 | ||||
function GetCookie(c_name) | |||||
{ | |||||
function GetCookie(c_name) { | |||||
if (document.cookie.length > 0) { | if (document.cookie.length > 0) { | ||||
c_start = document.cookie.indexOf(c_name + "=") | c_start = document.cookie.indexOf(c_name + "=") | ||||
if (c_start != -1) { | if (c_start != -1) { | ||||
@@ -18,8 +17,7 @@ function GetCookie(c_name) | |||||
} | } | ||||
return null | return null | ||||
} | } | ||||
function SetCookie(c_name,value,expiredays) | |||||
{ | |||||
function SetCookie(c_name, value, expiredays) { | |||||
var exdate = new Date(); | var exdate = new Date(); | ||||
exdate.setDate(exdate.getDate() + expiredays); | exdate.setDate(exdate.getDate() + expiredays); | ||||
document.cookie = c_name + "=" +escape(value) + ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString()); //使设置的有效时间正确。添加toGMTString() | document.cookie = c_name + "=" +escape(value) + ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString()); //使设置的有效时间正确。添加toGMTString() |