?? default.js
字號:
?$(document).ready(function(){
$(".title").toggle(
function()
{
$(this).next(".content").slideUp("slow");
},
function()
{
$(this).next(".content").slideDown("slow");
}
);
});
//取文本框的值
function getTextValue()
{
var html=document.all["htmlText"].value;
var server=document.all["serverText"].value;
alert("HTML文本框的值:"+html+"\n服務器文本框的值:"+server);
return false;
}
//取單選按鈕的值
function getRadioValue()
{
var radios=document.getElementsByName("radio");
for(var i=0;i<radios.length;i++)
{
if(radios[i].checked==true)
{
alert(radios[i].value);
}
}
return false;
}
//將右邊文本框的值賦值到左邊的文本框中
function RightToLeft()
{
var rightVal=document.all["txtRight"].value;
document.all["txtLeft"].value="";
if(rightVal.length==0)
{
document.all["txtRight"].value="不能為空";
document.all["txtRight"].style.color="red";
}
else
{
document.all["txtLeft"].style.color="black";
document.all["txtLeft"].value=rightVal;
document.all["txtRight"].value="";
}
return false;
}
//將左邊文本框的值賦值到右邊的文本框中
function LeftToRight()
{
var leftVal=document.all["txtLeft"].value;
document.all["txtRight"].value="";
if(leftVal.length==0)
{
document.all["txtLeft"].value="不能為空";
document.all["txtLeft"].style.color="red";
}
else
{
document.all["txtRight"].style.color="black";
document.all["txtRight"].value=leftVal;
document.all["txtLeft"].value="";
}
return false;
}
//雙擊Table行時間
function AssgnVal(tr)
{
//獲得子節點
var childs=tr.childNodes;
//firstChild的取值
//var ID=childs[0].firstChild.nodeValue;
var ID=childs[0].innerText;
var Content=childs[1].innerText;
//var Operation=childs[2].innerHTML;
var Operation=childs[2].innerText;
document.getElementById("txtID").value=ID;
//setAttribute(property,value)
document.all["txtContent"].setAttribute("value",Content);
}
//點擊“選擇”鏈接事件
function SelTr(link)
{
var childs=link.parentNode.parentNode.childNodes;
//firstChild的取值
//var ID=childs[0].firstChild.nodeValue;
var ID=childs[0].innerText;
var Content=childs[1].innerText;
//var Operation=childs[2].innerHTML;
var Operation=childs[2].innerText;
//alert(Operation);
document.getElementById("txtID").value=ID;
//setAttribute("property","value")
document.all["txtContent"].setAttribute("value",Content);
return false;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -