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

javaScript¹Ø±Õä¯ÀÀÆ÷ (²»µ¯³öÌáʾ¿ò)

Ò»¶ÎJavaScript½Å±¾³ÌÐò£¬¸ºÔð¹Ø±Õ´°¿Ú£¬Èç¹ûÍøÒ³²»ÊÇͨ¹ý½Å±¾³ÌÐò´ò¿ªµÄ£¨window.open()£©£¬µ÷ÓÃwindow.close()½Å±¾¹Ø±Õ´°¿ÚÇ°£¬±ØÐëÏȽ«window.opener¶ÔÏóÖÃΪnull£¬·ñÔòä¯ÀÀÆ÷£¨IE7¡¢IE8£©»áµ¯³öÒ»¸öÈ·¶¨¹Ø±ÕµÄ¶Ô»°¿ò¡£
£¼script language="javaScript"£¾
function closeWindow()
{
¡¡window.opener = null;
¡¡window.open(' ', '_self', ' ');
¡¡window.close();
}
£¼/script£¾
£¼input type='button' value='¹Ø±Õ´°¿Ú' onClick="closeWindow()"£¾
»ò
£¼input type="button" value="¹Ø±Õ´°¿Ú" onClick="window.opener = null;
window.open(' ', '_self', ' ');window.close()"£¾
¶ÔÓڹرտò¼Ü´°¿Ú
£¼script language="javaScript"£¾
function closeWindow()
{
window.opener = null;
window.open('', '_top', '');
window.parent.close();
}
£¼/script£¾


Ïà¹ØÎĵµ£º

JavaScriptÑéÖ¤ÕýÔò±í´ïʽ´óÈ«


JavaScriptÑéÖ¤ÕýÔò±í´ïʽ´óÈ«
JavaScriptÑéÖ¤ÕýÔò±í´ïʽ´óÈ«,ËѼ¯×îÈ«µÄJavaScriptÑéÖ¤ÕýÔò±í´ïʽ,¿ªÊ¼²é¿´°É£¬ÕâÀïµÄ¶¼ÊÇÕýÔò±í´ïʽµÄÀý×Ó£¬¾ßÌåºÍº¯Êý½áºÏµÄʹÓ÷½·¨£¬»¹Çë²é¿´ÏÂƪÎÄÕ¡¶JavaScriptʹÓÃÕýÔò±í´ïʽ½øÐÐÑéÖ¤
¡·
Æ¥ÅäÖÐÎÄ×Ö·ûµÄÕýÔò±í´ïʽ£º [u4e00-u9fa5]
ÆÀ×¢£ºÆ¥ÅäÖÐÎÄ»¹ÕæÊǸöÍ·ÌÛµÄÊ£¬ÓÐÁËÕâ¸ö ......

JavaScript ÕýÔò±í´ïʽÌæ»»

¼òµ¥µÄÀý×Ó£¬×Ô¼º¿´¿´£¬Ê¡µÃÒÔºóÀÏÊÇÈ¥ÕÒÁË¡£
<script language="javascript">
//ÓÃÕýÔòÌæ»»½«XÌæ»»³Éy
var s="daxdasx";//Ô­×Ö·û´®
var k="x";//±»Ìæ»»µÄ×Ö¶Î
var re = new RegExp(k,"g");
alert("Ì滻ǰ×Ö·û´®Îª£º"+s);
s = s.replace(re,"y");
alert("Ìæ»»ºó×Ö·û´®Îª£º"+s);
</script> ......

ÔÚjavascriptÖлñÈ¡ÖÐÓ¢ÎÄ×Ö·û³¤¶ÈµÄÎÊÌâ


ÔÚjavascriptÖлñÈ¡ÖÐÓ¢ÎÄ×Ö·û³¤¶ÈµÄÎÊÌâ
var i="Öйúa";
Ò»°ãÇé¿öÏ£¬ÎÒÃÇÓÃi.length»áµÃµ½½á¹û3
µ«ÓÐʱºòÎÒÃÇÐèÒª5£¬ÏÂÃæµÄС´úÂë¿ÉÒÔ½â¾öÎÊÌâ
Java´úÂë
 1. <script>     
 2.  alert (fucCheckLength("Öйúaaaa"));     
& ......

JavaScript¾«´â¶ÁÊé±Ê¼Ç(8)

µÚ8Õ  ·½·¨
JavaScript°üº¬ÁËÉÙÁ¿¿ÉÓÃÔÚ±ê×¼ÀàÐÍÉϵıê×¼·½·¨¡£
Array
array.concat(item…)
concat·½·¨·µ»ØÒ»¸öÐÂÊý×飬Ëü°üº¬arrayµÄdz¸´ÖÆ(shallow copy)²¢½«1¸ö»ò¶à¸ö²ÎÊýitem¸½¼ÓÔÚÆäºó¡£Èç¹û²ÎÊýitemÊÇÒ»¸öÊý×飬ÄÇôËüµÄÿ¸öÔªËػᱻ·Ö±ðÌí¼Ó¡£´ËÍ⣬Çë²Î¼û±¾ÕºóÃæµÄarray.push(item…)·½·¨¡ ......

JavaScriptÖÐÄäÃûº¯Êý£¬º¯ÊýÖ±½ÓÁ¿ºÍ±Õ°ü(ת)

Ô­Îijö´¦: http://www.dnew.cn/post/196.htm
ÏÈ¿´ÏÂÏÂÃ漸ÖÖд·¨
1.function f(x){return x*x;};f(x);
2.(function(x){return x*x;})(x);
3.(function(x){return x*x;}(x));
µÚÒ»ÖÖÎÒÃÇÓ¦¸Ã¶¼ºÜÊìϤÁË£¬ÕâÊÇÎÒÃǾ­³£Ê¹ÓõÄд·¨¡£µÚ¶þµÚÈýÖÖ¶¼ÊÇÄäÃûº¯ÊýµÄд·¨¡£
------------------------------------------------ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ