JavaScript»ñÈ¡¸´Ñ¡¿òµÄÖµ
<script type="text/javascript">
<!--
function myCheck() {
var str = "";
for(var i=0; i<document.forms[0].chk_type.length; i++) {
if(document.forms[0].chk_type[i].checked) {
str += document.forms[0].chk_type[i].value + " ";
}
}
document.getElementById('txt_info').value = str;
}
-->
</script>
<form name="form1">
<table width="348" height="158" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#33FF00">
<tr>
<td>ÐËȤ°®ºÃ£º</td>
<td><input type="checkbox" name="chk_type" value="×ãÇò"/>×ãÇò
<input type="checkbox" name="chk_type" value="ÉÏÍø"/>ÉÏÍø
<input type="checkbox" name="chk_type" value="¿´µçÓ°"/>¿´µçÓ°
<input type="checkbox" name="chk_type" value="ħÊõ"/>ħÊõ
</td>
</tr>
<tr>
<td>ÄãÑ¡ÔñµÄÊÇ£º</td>
<td>
<textarea name="txt_info" onfocus="return myCheck();"></textarea>
</td>
&nb
Ïà¹ØÎĵµ£º
function class1(){
alert("class1");
};
function class2(){
alert("class2");
}
class2.prototype=class1.prototype;
var obj=new class2();
alert(obj instanceof class1);
alert(obj instanceof class2);
alert(class2.prototype.constructor);
class2.prototype.constructor(); ......
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ϵͳʱ¼äµÄÏÔʾ</title>
<script type="text/javascript">
function getDate() {
window.setInterval("setDate()", 1000); //Ñ»·µ÷ÓÃ ......
Ò»¡¢ÑéÖ¤Àà
1¡¢Êý×ÖÑéÖ¤ÄÚ
1.1 ÕûÊý
/^(-|\+)?\d+$/¡¡¡¡²»¿ÉÒÔΪ¿Õ
/^[-+]?\d*$/ ¿ÉÒÔΪ¿Õ
1.2 ´óÓÚ0µÄÕûÊý £¨ÓÃÓÚ´«À´µÄIDµÄÑéÖ¤)
/^\d+$/
1.3 ¸ºÕûÊýµÄÑéÖ¤
/^-\d+$/
1.4 ÕûÊý²»ÄÜ´óÓÚiMax
¸ù¾ÝÉÏÃæµÄÕýÔò¿ÉÒÔд³ö¡£
1.5 ÕûÊý²»ÄÜÐ¡Ó ......
Ò» Undefined ÀàÐÍ
Ö»ÓÐÒ»ÖÖÖµ undefined
ÒÔÏÂÈýÖÖÇé¿ötypeof ·µ»ØÀàÐÍΪundefined
1. µ±±äÁ¿Î´³õʼ»¯Ê±
2. ±äÁ¿Î´¶¨Òåʱ
3. º¯ÊýÎÞÃ÷È··µ»ØÖµÊ±£¨º¯ÊýûÓзµ»ØÖµÊ±·µ»ØµÄ¶¼ÊÇundefined£©
undefined ²¢²»µÈͬÓÚ䶨ÒåµÄÖµ
typeof ²¢²»ÕæÕýÇø·ÖÊÇ·ñÊÇ䶨Òå
¿´ÒÔÏÂʾÀý´úÂ룺
var oTemp;
alert(typeof o ......