/// var count; //获取checkbox值 function getallcheckboxvalue() { var ids="0"; jquery(":checkbox[name=checkboxitem]").each(function () { if (jquery(this).attr("checked")) { ids +=","+jquery(this).val(); count++; } }) return ids; } //编辑 function checkedit() { count = 0; var ids = getallcheckboxvalue(); if (ids == "0") { alert("请选择一条您要操作的记录!"); return false; } else if (count > 1) { alert("您只能选择一条记录进行操作!"); return false; } else { document.getelementbyid("checkitem").value = ids.replace('0,', ''); return true; } } //删除 function checkdel() { var ids = getallcheckboxvalue(); if (ids=="0") { alert("请先选择您要删除的记录!"); return false; } else { if (confirm("该操作不可恢复,您确定要删除吗?")) { document.getelementbyid("checkitem").value = ids.replace('0,', ''); return true; } else { return false; } } } function checkorder(nodeid, systemid, modeytype, datatype) { count = 0; var ids = getallcheckboxvalue(); if (ids == "0") { alert("请先选择您要排序的记录!"); return false; } else { if (count >1) { alert("您只能选择一条记录进行操作!"); return false; } else { var ids = ids.replace('0,', ''); showpopwin('contentorderto.aspx?collectionid=' + encodeuri(ids) + '&nodeid=' + nodeid + '&systemid=' + systemid + '&modetype=' + modeytype + '&datatype=' + datatype + '', 400, 220, _refresh); return false } } } function contentcheck(nodeid, systemid, modeytype, datatype) { var ids = getallcheckboxvalue(); if (ids == "0") { alert("请先选择您要审核的记录!"); return false; } else { var ids = ids.replace('0,', ''); showpopwin('content_checked.aspx?collectionid=' + encodeuri(ids) + '&nodeid=' + nodeid + '&systemid=' + systemid + '&modetype=' + modeytype + '', 400, 330, _refresh); return false } } //编辑批量 function checkmutieditor() { var ids = getallcheckboxvalue(); if (ids == "0") { alert("请选择一条您要操作的记录!"); return false; } else { document.getelementbyid("checkitem").value = ids.replace('0,', ''); return true; } } jquery(function () { //登录验证 jquery("#loginbtn").click(function () { var loginname = jquery("#loginname").val(); if (loginname == "" || loginname == "请输入用户名") { jquery("#loginname").val("请输入用户名").css("color", "#de595c"); jquery("#loginname").focus(function () { jquery("#loginname").val("").css("color", "#078ad5") }) return false; } var password = jquery("#password").val(); if (password == "") { jquery("#password").focus(function () { jquery("#password").val(""); }) return false; } var code = jquery("#code").val(); if (code == "" || code == "请输入验证码") { jquery("#code").val("请输入验证码").css("color", "#de595c"); jquery("#code").focus(function () { jquery("#code").val("").css("color", "#078ad5") }) return false; } }) //批量编辑图片 //名称 jquery("#imagename").keyup(function () { jquery(".names").val(jquery(this).val()); }) //描述 jquery("#imagedescription").keyup(function () { jquery(".desc").val(jquery(this).val()); }) })