?? opform.js
字號:
// JavaScript Document
var oldTrBgColor = "#FAFAFA";
function AlterTrBgColor(tr,i) {
var over = "#DDEEFF";
if(i == 0) {
oldTrBgColor = tr.bgColor;
tr.bgColor = over;
}else{
tr.bgColor = oldTrBgColor;
}
}
function delForm(url) {
var f = document.ActionForm;
var ids = document.all.ids;
var select = false;
if(ids == undefined) {
alert("請選擇一條記錄!");
return;
}
if(ids.length==undefined && ids.checked)
select = true;
for(var i=0;i<ids.length;i++) {
var temp = ids[i];
if(temp.checked) {
select = true;
break;
}
}
if(select) {
if(confirm("您確定刪除嗎?(刪除后是不可恢復(fù)的)")) {
f.action = url;
f.submit();
}
}else{
alert("請選擇一條記錄!");
}
}
function changeStatus(url) {
var f = document.ActionForm;
var ids = document.all.ids;
var select = false;
if(ids == undefined) {
alert("請選擇一條記錄!");
return;
}
if(ids.length==undefined && ids.checked)
select = true;
for(var i=0;i<ids.length;i++) {
var temp = ids[i];
if(temp.checked) {
select = true;
break;
}
}
if(select) {
if(confirm("您確定繼續(xù)嗎?(啟用或停用后將改變記錄狀態(tài))")) {
f.action = url;
f.submit();
}
}else{
alert("請選擇一條記錄!");
}
}
function recordMove(url) {
var f = document.ActionForm;
var id = "";
var select = false;
for(var i=0;i<f.elements.length;i++) {
var temp = f.elements[i];
if(temp.name=="ids" && temp.checked) {
select = true;
id += temp.value+",";
}
}
id = id.substring(0,id.length-1);
if(select) {
if(id.indexOf(",")!=-1) {
alert("只能同時(shí)對一條記錄進(jìn)行移動!");
}
else if(confirm("您確定移動您選擇的記錄嗎?")) {
url = url + id;
window.location = url;
}
}else{
alert("請選擇一條記錄!");
}
}
//submit ActionForm
function doSubmit(url) {
var f = document.ActionForm;
if(url!=null)
f.action = url;
f.submit();
}
//check all checkbox
function checkAll(checked) {
var f = document.all.ids;
if(f != undefined) {
for(var i=0;i<f.length;i++) {
f[i].checked = checked;
}
}
}
//submit SearchForm
function doSearch() {
var f = document.SearchForm;
f.submit();
}
function getIds() {
var f = document.ActionForm;
var ids = document.all.ids;
var s = "";
if(ids == null)
s = "";
else if(ids.length==undefined && ids.checked)
s = ids.value;
else
for(var i=0;i<ids.length;i++) {
var temp = ids[i];
if(temp.checked) {
if(s == "")
s = temp.value;
else
s += ","+temp.value;
}
}
return s;
}
function showadv(checks){
if(checks==0)
{
document.all.base.style.display = "none";
document.all.adv.style.display = "";
if (document.all.base1) {
document.all.base1.style.display = "none";
document.all.adv1.style.display = "";
}
}
else
{
document.all.base.style.display = "";
document.all.adv.style.display = "none";
if (document.all.adv1) {
document.all.base1.style.display = "";
document.all.adv1.style.display = "none";
}
}
changeAdvanced(checks);
}
// 用于保持高級查詢項(xiàng)是否展開狀態(tài)用
function changeAdvanced(type){
try{
if(type==0){
document.getElementById("isAdvanced0").value = "Y";
document.getElementById("isAdvanced1").value = "Y";
}else if(type==1){
document.getElementById("isAdvanced0").value = "N";
document.getElementById("isAdvanced1").value = "N";
}
}catch(e){
// do nothing
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -