Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JavaScript Ìí¼Óɾ³ý checkbox

<html>
<body>
<table width="200" border="1" id="tb">
<tr id="r1">
<td><input type="checkbox" name="ck" value="1"></td>
<td>abc</td>
</tr>
</table>
<p>
<input type="button" onClick="add();" value="add"/>
<input name="button" type="button" onClick="deletes();" value="delete"/>
</p>
</body>

<mce:script language="javascript"><!--
var tb=document.getElementById("tb");
var i=2;
function add()
{
var mytr=tb.insertRow();
mytr.setAttribute("id","r"+i);
var mytd_1=mytr.insertCell();
var mytd_2=mytr.insertCell();
mytd_1.innerHTML="<input type='checkbox' name='ck' value='"+i+"'>";
mytd_2.innerText="abc"+i;
i++;

}

function deletes()
{

var ok=document.getElementsByName("ck");
for(var k=0;k<ok.length;k++)
{
if(ok[k].checked==true)
{
tb.deleteRow(k);
k=k-1;
}
}
}
// --></mce:script>
</html>


Ïà¹ØÎĵµ£º

JavaScript »ñÈ¡¶ÔÏóµÄ¸ß¶ÈºÍ¿í¶ÈÏêϸ˵Ã÷

scrollHeight: »ñÈ¡¶ÔÏóµÄ¹ö¶¯¸ß¶È¡£
scrollLeft:ÉèÖûò»ñȡλÓÚ¶ÔÏó×ó±ß½çºÍ´°¿ÚÖÐÄ¿Ç°¿É¼ûÄÚÈݵÄ×î×ó¶ËÖ®¼äµÄ¾àÀë
scrollTop:ÉèÖûò»ñȡλÓÚ¶ÔÏó×¶ËºÍ´°¿ÚÖпɼûÄÚÈݵÄ×¶ËÖ®¼äµÄ¾àÀë
scrollWidth:»ñÈ¡¶ÔÏóµÄ¹ö¶¯¿í¶È
offsetHeight:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê offsetParent ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¸ß¶È
offsetL ......

Àí½â JavaScript ±Õ°ü{תÔØ}

¡¾×ª¡¿http://www.cnblogs.com/chenxizhang/archive/2010/01/02/1638010.html
±¾ÎÄתÔØ×Ô£ºhttp://www.cn-cuckoo.com/2007/08/01/understand-javascript-closures-72.html
Òª³ÉΪ¸ß¼¶ JavaScript ³ÌÐòÔ±£¬¾Í±ØÐëÀí½â±Õ°ü¡£
±¾ÎĽáºÏ ECMA 262 ¹æ·¶Ïê½âÁ˱հüµÄÄÚ²¿¹¤×÷»úÖÆ£¬Èà JavaScript ±à³ÌÈËÔ±¶Ô±Õ°üµÄÀí½â´Ó&ldquo ......

javascript ±Õ°ü

¡¾×ª¡¿http://www.cnblogs.com/chenxizhang/archive/2010/01/02/1638010.html
±¾ÎÄתÔØ×Ô£ºhttp://www.cn-cuckoo.com/2007/08/01/understand-javascript-closures-72.html
Òª³ÉΪ¸ß¼¶ JavaScript ³ÌÐòÔ±£¬¾Í±ØÐëÀí½â±Õ°ü¡£
±¾ÎĽáºÏ ECMA 262 ¹æ·¶Ïê½âÁ˱հüµÄÄÚ²¿¹¤×÷»úÖÆ£¬Èà JavaScript ±à³ÌÈËÔ±¶Ô±Õ°üµÄÀí½â´Ó&ldquo ......

javascript sort table & merge same column

˵Ã÷£º
appendChild()
ÎÒ²âÊԵĽá¹û£º
1 appendChild() ±í¸ñÖÐËùÓÐÐÐÑ­»·ÉÏÒÆÒ»ÐÐºó£¬ ÓÃеģ¨ÐУ©Ìæ»»ÁË ±í¸ñµÄÄ©ÐÐ £»Ï൱ÓÚÌæ»»Á˱í¸ñµÄµÚÒ»ÐУ¬²¢Ñ­»·ÉÏÒÆÒ»ÐÐ
2 ²»¸Ä±ä ±í¸ñµÄ×Ü ÐÐÊý
insertRow()
1 insertRow() ÔÚ±í¸ñÖвåÈëÒ»ÐУ¬±í¸ñ×ÜÐÐÊéÔöÒ»
2 insertRow(index) index=0 , ÔÚ±íÍ·Ôö¼Ó£¬ index=-1, ÔÚ± ......

´«ÖDz¥¿Í 2010 01 18 JavaScript»ù´¡¼ÓÇ¿

½ñÌìAJAX±ØÐëÓÃJS£¬×öÇ°¶Ë±ØÐëÓÃJS£¬ÓÉÓڿγ̽ô£¬Ö»°²ÅÅÁËÒ»Ììʱ¼ä£¬Ö»½²ÁËDom¡£ DOM ¿ÉÔÚJ2SEAPIËÑDocument£¬±ã¿ÉÒԲ鿴·½·¨ DOMÊ÷:½Úµã£¨node£©µÄ²ã´Î¡£ ½Úµã·ÖΪÈýÖÖÀàÐÍ£º ½Úµã£¨node£©£ºÀ´Ô´ÓÚÍøÂçÀíÂÛ£¬´ú±íÍøÂçÖеÄÒ»¸öÁ¬½Óµã¡£ÍøÂçÊÇÓɽڵ㹹³ÉµÄ¼¯ºÏ 1.½Úµã·ÖΪÈýÖÖÀàÐÍ£º
element node attribute node ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ