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

JavaScript ±í¸ñ¶ÔÏóºÍ²Ù×÷

Ò»¡£È¡±í¸ñ¶ÔÏó
var getTable= document.getElementById("tabHeTong");
 
¶þ¡£²åÈëÐÐ
var oTR = getTable.insertRow();//ÐÂÔöÒ»ÐÐ
 
Èý¡£Ä³ÐмÓÈëÁÐ
var oTDa = oTR.insertCell();//ÐÂÔöÒ»ÁÐ
var oTDb = oTR.insertCell();//ÐÂÔö¶þÁÐ
var oTDc = oTR.insertCell();//ÐÂÔöÈýÁÐ
ËÄ¡£É¾³ýÐУº
getTable.deleteRow(flagRow-1);//ɾ³ýÐÐ
 
Î塣ѡÖÐÐУº
var i=event.srcElement.parentNode.parentNode.rowIndex;
Áù¡£Ê¾Àý£º È¡±í¸ñµ±Ç°ÐÐÊý¾Ý
 var currRowIndex=event.srcElement.parentNode.parentNode.rowIndex;
 var objTable= document.getElementById("contable");
 var row=objTable.rows[currRowIndex];
 for(var i=1;i<row.cells.length;i++){
    alert(objTable.rows[currRowIndex].cells[i].innerText);
 }
Table±í¸ñ¶ÔÏó
Table¶ÔÏó:±íʾHTMLÎĵµÖÐµÄ±í£¬¶ÔÓÚÎĵµÖÐÿ¸ö<table>±ê¼Ç£¬ä¯ÀÀÆ÷¶¼´´½¨Ò»¸öTable¶ÔÏó.
Table¶ÔÏ󼯺Ï
 
¼¯ºÏ
 
ÃèÊö
 
cells[]
»ñÈ¡°üº¬±í¸ñÖÐËùÓе¥Ôª¸ñµÄÊý×é
rows[]
»ñÈ¡°üº¬±í¸ñÖÐËùÓÐÐеÄÊý×é
tBodies[]
»ñÈ¡°üº¬±í¸ñÖÐËùÓÐtbodyµÄÊý×é
Table¶ÔÏóÊôÐÔ
 
border
ÉèÖûò»ñÈ¡±í¸ñ±ß¿ò
caption
ÉèÖûò»ñÈ¡±í¸ñ±êÌâ
cellPadding
ÉèÖûò»ñȡÿ¸öµ¥Ôª¸ñ±ß¿òÓëÄÚÈݵĿí¶È
cellSpacing
ÉèÖûò»ñÈ¡±í¸ñÖе¥Ôª¸ñµÄ¼ä¾à
frame
ÉèÖûò»ñÈ¡±í¸ñ¾ßÓÐÄÄЩ±ß¿ò
rules
ÉèÖûò»ñÈ¡±í¸ñÖеÄÄÚ²¿±ß¿ò
summary
ÉèÖûò»ñÈ¡±í¸ñµÄÃèÊö
tFoot
»ñÈ¡±í¸ñµÄtFoot¶ÔÏó
tHead
»ñÈ¡±í¸ñµÄtHead¶ÔÏó
width
ÉèÖûò»ñÈ¡±í¸ñ¿í¶È
Table¶ÔÏó·½·¨
 
createCaption()
Ϊ±í¸ñ´´½¨Ò»¸ö¿ÕµÄ±êÌâÔªËØ
createTFoot()
Ϊ±í¸ñ´´½¨Ò»¸ö¿ÕµÄtFootÔªËØ
createTHead()
Ϊ±í¸ñ´´½¨Ò»¸ö¿ÕµÄtHeadÔªËØ
deleteCaption()
ɾ³ý±í¸ñµÄ±êÌâÔªËØ
deleteRow()
ɾ³ýÖ¸¶¨µÄ±í¸ñÐÐ
deleteTFoot()
ɾ³ý±í¸ñµÄtFootÔªËØ
deleteTHead()
ɾ³ý±í¸ñµÄtHeadÔªËØ
insertRow()
Ïò±í¸ñÖвåÈëÐÂÐÐ
 
 
 
TableCell¶ÔÏó:±íʾHTMLÎĵµÖбíµÄµ¥Ôª¸ñ£¬¶ÔÓÚÎĵµÖÐÿ¸ö<td>±ê¼Ç£¬ä¯ÀÀÆ÷¶¼´´½¨Ò»¸öTableCell¶ÔÏó.
TableCell¶ÔÏóÊôÐÔ
 
ÊôÐÔ
 
ÃèÊö
 
abbr
ÉèÖûò»ñÈ¡µ¥Ôª¸ñµÄÕªÒª
align
ÉèÖûò»ñÈ¡µ¥Ôª¸ñÖÐÎÄ×ÖµÄˮƽ¶ÔÆë·½Ïò
axis
ÉèÖûò»ñÈ¡ÒÔ¶ººÅ·Ö¸ôµÄÏà¹Øµ¥Ôª¸ñ×


Ïà¹ØÎĵµ£º

javascript ½ûÖ¹Êó±êÓÒ¼ü...

<body oncontextmenu="return false" onselectstart="return false" ondragstart="return false" onbeforecopy="return false" onmouseup=document.selection.empty() oncopy=document.selection.empty() onselect=document.selection.empty()></body>
½²ÉÏÃæºìÉ«ÏÔʾµÄ²åÈëµ½ÍøÒ³ÖоͿÉÒÔʵÏÖÊó±êÓÒ»÷ÎÞЧ
......

Javascript Êý×éѧϰһÔò

1. Ó¦ÓàArray.prototype.joinʵÏÖ×Ö·ûºÏ²¢
·½·¨1.
String.prototype.times = function(n) {
    return Array.prototype.join.call({length:n+1}, this);
};
"js".times(5)   // => "jsjsjsjsjs"
·½·¨2.
 var ArrayTest=new Array("HE","LL","O");
 var hello = Array.prot ......

ÓÃjavascriptɾ³ýµ±Ç°ÐУ¬Ìí¼ÓÐÐ

ɾ³ýÐÐ
<script>  
  function   del(obj)  
  {  
        obj.parentNode.parentNode.removeNode(true);  
  }    
  </script>  
  <body& ......

JavascriptÈÕÆÚ¸ñʽ ÕýÔò yyyy MM dd

reg = /^((((((0[48])|([13579][26])|([2468][048]))00)|([0-9][0-9]((0[48])|([13579][26])|([2468][048]))))-02-29)|(((000[1-9])|(00[1-9][0-9])|(0[1-9][0-9][0-9])|([1-9][0-9][0-9][0-9]))-((((0[13578])|(1[02]))-31)|(((0[1,3-9])|(1[0-2]))-(29|30))|(((0[1-9])|(1[0-2]))-((0[1-9])|(1[0-9])|(2[0-8]))))))$/i; ......

javascript¿ØÖÆflash¶¯»­

Ò»¡¢½éÉÜÓëFlash¶¯»­¿ØÖÆÓйصÄjavascriptº¯Êý£º 
º¯ÊýÃû                              Ê¹Óà         &n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ