JavascriptÖеÄÈÕÆÚ¸ñʽ»¯
×öJava¿ª·¢µÄÈ˶¼ÖªµÀ,ÔÚJavaÖÐÓÐXXXFormat(±ÈÈçSimpleDateFormat)Àà¿ÉÒÔ°ïÖúÎÒÃǵõ½ÏëÒªµÄÊý¾Ý¸ñʽ.ÔÚJavaScriptÖÐûÓÐÕâÑùµÄ¶«Î÷,ËùÒÔÎÒÃÇÐèÒªÓÃÁíÒ»ÖÖ·½·¨µÃµ½ÎÒÃÇÏëÒªµÄ¶«Î÷.´úÂëÈçÏÂ:
<html>
<head>
<title>Test</title>
<mce:script type="text/javascript" language="javascript"><!--
function formatDate(now) {
var year = now.getYear();
var month = now.getMonth()+1;
var Date = now.getDate();
var hour = now.getHours();
var minute = now.getMinutes();
var second = now.getSeconds();
return year+"-"+month+"-"+date+" "+hour+":"+minute+":"+second;
}
var d = new Date(1230999938);
alert(formatDate(d));
// --></mce:script>
</head>
<body>
</body>
</html>
Ïà¹ØÎĵµ£º
˵Ã÷£º
appendChild()
ÎÒ²âÊԵĽá¹û£º
1 appendChild() ±í¸ñÖÐËùÓÐÐÐÑ»·ÉÏÒÆÒ»ÐÐºó£¬ ÓÃеģ¨ÐУ©Ìæ»»ÁË ±í¸ñµÄÄ©ÐÐ £»Ï൱ÓÚÌæ»»Á˱í¸ñµÄµÚÒ»ÐУ¬²¢Ñ»·ÉÏÒÆÒ»ÐÐ
2 ²»¸Ä±ä ±í¸ñµÄ×Ü ÐÐÊý
insertRow()
1 insertRow() ÔÚ±í¸ñÖвåÈëÒ»ÐУ¬±í¸ñ×ÜÐÐÊéÔöÒ»
2 insertRow(index) index=0 , ÔÚ±íÍ·Ôö¼Ó£¬ index=-1, ÔÚ± ......
Éϴβ¿ÃÅÕÐÆ¸ÐèÒªwebǰ̨¼¼Êõ±ÊÊÔÌâÄ¿£¬ÎÒÔÚÍøÉÏËÑË÷һϣ¬»¹ÕæÕÒ²»µ½Ê²Ã´¡£ÓÚÊÇ×Ô¼º±àÁ˼¸µÀ¡£
ÕÐÆ¸½áÊøÁË£¬ÌâÄ¿¹À¼ÆÃ»ÓÃÁË¡£ÕâÀ﹫²¼³öÀ´£¬¶Ôjs¸ÐÐËȤµÄÐÂÊÖ¿ÉÒÔ×ö×ö¿´£¬»òÐíÓаïÖúŶ¡£
´ð°¸¾Í²»¹«²¼ÁË£¬×Ô¼ºÒ»ÊÔ¾ÍÖªµÀÁË¡£
Ò»¡¢µ¥Ñ¡Ìâ
......
<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"/> ......
JavaScript ÊǸù¾Ý "ECMAScript"±ê×¼ÖÆ¶¨µÄÍøÒ³½Å±¾ÓïÑÔ¡£Õâ¸ö±ê×¼ÓÉ ECMA ×éÖ¯·¢Õ¹ºÍά»¤¡£ECMA-262
ÊÇÕýʽµÄ JavaScript ±ê×¼¡£Õâ¸ö±ê×¼»ùÓÚ JavaScript (Netscape) ºÍ JScript
(Microsoft)¡£Netscape (Navigator 2.0) µÄ Brendan Eich ·¢Ã÷ÁËÕâÃÅÓïÑÔ£¬´Ó 1996
Ä꿪ʼ£¬ÒѾ³öÏÖÔÚËùÓÐµÄ Netscape ºÍ Micro ......
<asp:TextBox ID="TextBox1" runat="server" onkeydown="return NotAllowSpace(this);"/></asp:TextBox>
<mce:script type="text/javascript" language="javascript"><!--
function NotAllowSpace(e)
{
var keyVal =(window.event) ? event.keyCode : e.keyCode; ......