http://www.w3school.com.cn/htmldom/met_table_deleterow.asp
¶¨ÒåºÍÓ÷¨
deleteRow() ·½·¨ÓÃÓÚ´Ó±í¸ñɾ³ýÖ¸¶¨Î»ÖõÄÐС£
Óï·¨
tableObject.deleteRow(index)
˵Ã÷
²ÎÊý index Ö¸¶¨ÁËҪɾ³ýµÄÐÐÔÚ±íÖеÄλÖá£ÐеıàÂë˳Ðò¾ÍÊÇËûÃÇÔÚÎĵµÔ´´úÂëÖгöÏÖµÄ˳Ðò¡£<thead> ºÍ <tfoot> ÖеÄÐÐÓë±íÖÐÆäËüÐÐÒ»Æð±àÂë¡£
Àý×Ó
<html>
<head>
<script type="text/javascript">
function deleteRow(r)
{
var i=r.parentNode.parentNode.rowIndex
document.getElementById('myTable').deleteRow(i)
}
</script>
</head>
<body>
<table id="myTable" border="1">
<tr>
<td>Row 1</td>
<td><input type="button" value="ɾ³ý" onclick="deleteRow(this)"></td>
</tr>
<tr>
<td>Row 2</td>
<td><input type="button" value="ɾ³ý" onclick="deleteRow(this)"></td>
</tr>
<tr>
<td>Row 3</td>
<td><input ty ......
<body>
<iframe name="pic" src=""; width="400" height="300" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"></iframe>
<p>
<a href="www.163.com" mce_href="www.163.com" target="pic">ÍøÒ×</a>
<a href="www.sina.com.cn" mce_href="www.sina.com.cn" target="pic">ÐÂÀË</a>
</p>
</body>
²Î¿¼ÍøÖ·£ºhttp://www.dreamdu.com/xhtml/tag_iframe/ ......
ÈçºÎ±íʾÉϼ¶Ä¿Â¼
../±íʾԴÎļþËùÔÚĿ¼µÄÉÏÒ»¼¶Ä¿Â¼£¬../../±íʾԴÎļþËùÔÚĿ¼µÄÉÏÉϼ¶Ä¿Â¼£¬ÒÔ´ËÀàÍÆ¡£
¼ÙÉèinfo.html·¾¶ÊÇ£ºc:\Inetpub\wwwroot\sites\blabla\info.html
¼ÙÉèindex.html·¾¶ÊÇ£ºc:\Inetpub\wwwroot\sites\index.html
ÔÚinfo.html¼ÓÈëindex.html³¬Á´½ÓµÄ´úÂëÓ¦¸ÃÕâÑùд£º
<a href = "../index.html">index.html</a>
¼ÙÉèinfo.html·¾¶ÊÇ£ºc:\Inetpub\wwwroot\sites\blabla\info.html
¼ÙÉèindex.html·¾¶ÊÇ£ºc:\Inetpub\wwwroot\index.html
ÔÚinfo.html¼ÓÈëindex.html³¬Á´½ÓµÄ´úÂëÓ¦¸ÃÕâÑùд£º
<a href="../../../index.html">index.html</a>
¼ÙÉèinfo.html·¾¶ÊÇ£ºc:\Inetpub\wwwroot\sites\blabla\info.html
¼ÙÉèindex.html·¾¶ÊÇ£ºc:\Inetpub\wwwroot\sites\wowstory\index.html
ÔÚinfo.html¼ÓÈëindex.html³¬Á´½ÓµÄ´úÂëÓ¦¸ÃÕâÑùд£º
<a href = "../wowstory/index.html">index.html</a>
ÈçºÎ±íʾϼ¶Ä¿Â¼ÒýÓÃϼ¶Ä¿Â¼µÄÎļþ£¬Ö±½Óдϼ¶Ä¿Â¼ÎļþµÄ·¾¶¼´¿É¡£¼ÙÉèinfo.html·¾¶ÊÇ£ºc:\Inetpub\wwwroot\sites\blabla\info.html¼ÙÉèindex.html·¾¶ÊÇ£ºc:\Inetpub\wwwroot\sites\ ......
CSSÊÇDHTMLµÄ»ù´¡£¬CSSÓÃÓÚÉ趨HTMLÔªËØÔÚÒ³ÃæÉϵÄÏÔʾ·ç¸ñ£¬¶øCSS-PÔòÊÇCSSµÄÒ»¸öÀ©Õ¹£¬Ëü¿ÉÓÃÀ´¿ØÖÆHTMLÔªËØÔÚÍøÒ³ÉÏ»òÕß˵ÔÚ´°¿ÚµÄλÖá£ÏÂÃæµÄÁ½¸öÁ´½ÓÌṩÁËCSSºÍCSS£PÏ꾡µÄ¼¼ÊõÊֲ᣺
¡¡¡¡ W3C CSS-Positioning
¡¡¡¡ Builder.com's CSS Guide
¡¡¡¡ ÔÚ±¾¿Î³ÌÖУ¬½«»á·´¸´µØ¶ÔCSS½øÐнéÉÜ¡£
¡¡¡¡ ʹÓÃDIV±êÇ©
¡¡¡¡ ʹÓÃCSS£P£¬Ö÷ÒªÒÀ¿¿< div >±êÇ©À´ÊµÏÖ£¬µ±Äã°ÑHTMLÄÚÈÝ·ÅÔÚ< div >±êÇ©Àïʱ£¬¿ÉÒÔ³ÆËüΪ:“DIV¿é”, “DIV ÔªËØ”, “CSS-layer”,»òÕß¼òµ¥µÄ³Æ֮Ϊ“layer”¡£
¡¡¡¡ ʹÓÃDIV±êÇ©µÄ·½·¨ºÍÆäËû±êǩûÓÐʲôÁ½Ñù£º
¡¡¡¡ < div >
¡¡¡¡ HTMLÄÚÈÝ
¡¡¡¡ < /div >
¡¡¡¡ ´¿´âʹÓÃ< DIV >±êÇ©¶ø²»¼ÓÈκÎCSSÄÚÈÝ£¬ÆäЧ¹ûÓëÓÃ< P >< /P >ÊÇÒ»ÑùµÄ¡£
¡¡¡¡ µ«µ±°ÑCSS·Å½øDIV±êÇ©ÖÐÒÔºó£¬ÎÒÃǾͿÉÒÔÖ¸¶¨HMTLÔªËØÏÔʾÔÚÆÁÄ»ÉϵľßÌåλÖ㬿ÉÒÔÔÚijһλÖÃÉÏ»³ö·½ÐλòÏߣ¬»òÕßÖ¸¶¨ÎÄ×ÖÔÚijһ¸ö¿éÖÐÈçºÎÏÔʾ¡£Ê×ÏÈÒª×öµÄ£¬ÊǸøÕâ¸öDIVÔªËØ£¨¼´²ã£©¼ÓÉÏÒ»¸öΨһµÄID±êʶ£¨IDµÄ×÷ÓÃÀàËÆÓÚΪÕâ¸ö²ãÆð¸öÃû×Ö£©¡£
¡¡¡¡ < div¡¡id="abc" >
¡¡¡¡ ¼ÓÒ»¸öIDºÅ
¡¡¡¡ < / ......
Èç¹ûÓÃwebbrowserµÄdocumentÈ¥»ñÈ¡IFrameÕâ¸ö¶ÔÏó£¬ËæºóÒ»¶¨»áµÃµ½accessdeniedµÄ´íÎó£¬ÎªÊ²Ã´£¿
ÕÒÁËһϣ¬¾Ý˵ÊDz»ÄÜ¿çÓò·ÃÎÊ...
ÖÕÓÚÓÐÒ»Ì죬ÊÔÁËһϣ¬ÔÚOnDocumentCompleteʼþÀïÃæ·µ»ØµÄdispatch¾ÍÊÇiframeµÄIHTMLWindow2¶ÔÏó£¬ÔÚÄÇÀï¿ÉÒÔ²Ù×÷ËùÓеĶÔÏó£¬È»ºó£¬ÄãÏë×öʲô¾ÍËæÄãÁË£¬²»ÖªµÀÈç¹ûÕâ¸öʱºò±£´æÁËÕâ¸öIHTMLWindow2µÄÖ¸ÕëÔÚÒÔºóÄܲ»ÄÜ·ÃÎÊÁË ......
תÔØ£ºhttp://jiangzhengjun.javaeye.com/blog/480996
ʼþ
DOMͬʱ֧³ÖÁ½ÖÖʼþģʽ£º²¶»ñÐÍʼþºÍðÅÝÐÍʼþ£¬µ«ÊÇ£¬²¶»ñÐÍʼþÏÈ·¢Éú¡£Á½ÖÖʼþÁ÷»á´¥¼°DOMÖеÄËùÓжÔÏ󣬴Ódocument¶ÔÏó¿ª
ʼ£¬Ò²ÔÚdocument¶ÔÏó½áÊø£¨´ó²¿·Ö¼æÈݱê×¼µÄä¯ÀÀ»á¼ÌÐø½«Ê¼þ²¶»ñ/ðÅÝÑÓÐøÖÁwindow¶ÔÏ󣩣¬DOMÖеÄÔªËض¼»áÁ¬ÐøÊÕµ½Á½´Îʼþ£¬Ò»´ÎÔÚ
²¶»ñ¹ý³ÌÖУ¬ÁíÒ»´ÎÔÚðÅݹý³ÌÖС£DOMʼþÄ£ÐÍ×î¶ÀÌصÄÐÔÖÊÊÇ£¬Îı¾½ÚµãÒ²´¥·¢Ê¼þ£¨ÔÚIEÖв»»á£©¡£µã»÷Îı¾½ÚµãʼþÁ÷Ó¦¸ÃÈçÏÂͼ£º
´«Í³Ê¼þ´¦Àíº¯ÊýÓÐÁ½ÖÖ·ÖÅ䷽ʽ£ºÔÚJavaScriptÖлòÕßÔÚHTMLÖС£
ÔÚJavaScriptÖзÖÅäʼþ´¦Àíº¯Êý£º
Js´úÂë
var
oDiv = document.getElementById(
"div1"
);
oDiv.onclick = function
() {
alert("I was clicked"
);
};
var oDiv = document.getElementById("div1");
oDiv.onclick = function () {
alert("I was clicked");
};
×¢£ºÔÚÕâ¸ö·ÖÅä·½·¨£¬Ê¼þ´¦Àíº¯ÊýÃû³Æ±ØÐëСд£¬²ÅÄÜÕýÈ·ÏìӦʼ ......