JavaScript¡¡ÊµÏÖË«ÏòÑ¡ÔñÁбí¿ò
<html>
<head>
<script language="JavaScript">
<!--Ò³ÃæÔØÈëʱ³õʼ»¯ËùÓÐδѡÔñµÄÊý¾Ý-->
function loadAllUnselected()
{
var unassignedTable=document.getElementById("unassignedTable");
var rowsUnselected=unassignedTable.childNodes[0].childNodes;
document.getElementById("unselected").value="";
for(var i=0;i<rowsUnselected.length;i++)
{
if(rowsUnselected[i].tagName=="TR" && rowsUnselected[i].getAttribute("id")!='')
{
document.getElementById("unselected").value=
document.getElementById("unselected").value+'||'+rowsUnselected[i].getAttribute("id");
}
}
var assignedTable=document.getElementById("assignedTable");
var rowsSelected=assignedTable.childNodes[0].childNodes;
for(var i=0;i<rowsSelected.length;i++)
{
if(rowsSelected[i].tagName=="TR" && rowsSelected[i].getAttribute("id")!='')
{
document.getElement
Ïà¹ØÎĵµ£º
·ÃÎʿؼþµÄÖ÷Òª¶ÔÏóÊÇ:document¶ÔÏó¡£·Ö±ð¶ÔÓ¦µ±Ç°ÎĵµËùÓеģ¨×Ó¶ÔÏ󣩸öÈ˹۵㡣²¢ÇÒÒѾÌṩµÄ¼¸¸öÖ÷Òª·½·¨À´·ÃÎʶÔÏó¡£
1. document.getElementById
2. document.getElementsByName
3 document.getElementsByTagName
4 document.all
ÏÂÃæÎÒÖ÷Ҫ̸̸ÒÔÉϼ¸¸ö·½·¨µÄ¾ßÌåÓ÷¨£º
Ò»£®Ê×ÏÈÎÒÀ´Ì¸Ì¸document.getE ......
function getInfo()
{
var s = "";
s += " ÍøÒ³¿É¼ûÇøÓò¿í£º"+ document.body.clientWidth+"\n";
s += " ÍøÒ³¿É¼ûÇøÓò¸ß£º"+ document.body.clientHeight+"\n";
s += " ÍøÒ³¿É¼ ......
Èç¹ûÄãÍêÈ«²»¶®£¬ÄÇôÆÚÍû1-2ÖÜ¿´ÍêÒ»±éÀµ¹....²»Óÿ´µÄÌ«×Ðϸ£¬ºóÃæÔÙ¿´µ½²»¶®µÄʱºò»ØÍ·È¥¿´ÕâЩ¶«Î÷ºÃÁË¡£
1. Ç°ÑÔºÍ×¼±¸¹¤×÷
ÕâÀï²»»á½éÉÜʲôÈí¼þµÄÓ÷¨Ò»ÀàµÄ¶«Î÷¡£Èç¹û¾õµÃÊÖд´úÂëÊÇÔÚ×°µÄÈË¿ÉÒÔ³öÈ¥ÁË£¬Ð»Ð»¡£
Ê×ÏÈÄãÒªÓÐ̨µçÄÔ¡£È»ºóËüÓ¦¸Ã×°×Åwindows ºÍ IE¡£ÏÂÃæËù̸µ½µÄ´úÂë ......
¢Ù JavaScriptÌí¼ÓλÖã¬Ìí¼ÓλÖôíÎ󣬻áÒýÆðJavaScript´úÂëÎÞ·¨Ö´ÐеÄÎÊÌâ¡£
<head runat="server">
<script type='text/javascript' language="javascript">
<!—
//“Ìí¼ÓÄÚÈÝ”
//-->
</script>
</head>
¢Ú ÒýÓÃËû´¦µÄ½Å±¾ ......
<a href="#" onclick="ChildNode(this);">aaa</a>Òª¸ÄΪ
<a href="#" onclick="ChildNode(event);">aaa</a>
ÎÞ·¨È¡µÃthis¶ÔÏó£¬ÒªÓÃÒÔÏ·½·¨À´È¡µÃ¡£
function ChildNode(e)
{
var evt = e ? e : (window.event ? window.event : null); //´Ë·½·¨ÎªÁËÔÚfirefoxÖеļæÈÝ
var node = evt.srcEl ......