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

JavaScript summary

1. ÍøÒ³ÖⶻñJavaScript´íÎóµÄÁ½ÖÖ·½·¨£º
ʹÓà onerror ʼþÊÇÒ»ÖÖÀÏʽµÄ±ê×¼µÄÔÚÍøÒ³Öⶻñ Javascript ´íÎóµÄ·½·¨
throw ÉùÃ÷µÄ×÷ÓÃÊÇ´´½¨ exception£¨Òì³££©¡£Äã¿ÉÒÔ°ÑÕâ¸öÉùÃ÷Óë try...catch ÉùÃ÷ÅäºÏʹÓã¬ÒÔ´ïµ½¿ØÖƳÌÐòÁ÷²¢²úÉú¾«È·´íÎóÏûÏ¢µÄÄ¿µÄ¡£
2.Á½¸öJavaScriptÎļþ¼äº¯ÊýµÄµ÷ÓÃ
http://space.flash8.net/space/batch.viewlink.php?itemid=318459


Ïà¹ØÎĵµ£º

javascriptÖÐreplace()


javascriptÖÐreplace()
   ÔÚjavascriptÖУ¬StringµÄº¯Êýreplace()¼òֱ̫ÈÃÈËϲ°®ÁË¡£ËüÁé»î¶øÇ¿´óµÄ×Ö·ûÌæ»»´¦ÀíÄÜÁ¦£¬ÈÃÎÒ²»½ûÏëÏò´ó¼Ò½éÉÜËü¡£
¡¡¡¡replace()×î¼òµ¥µÄËãÊÇÄÜÁ¦¾ÍÊǼòµ¥µÄ×Ö·ûÌæ»»¡£Ê¾Àý´úÂëÈçÏ£º
<script language="javascript">
 var strM = "javascript is a good script ......

javaScript »ñµÃ´¥·¢Ê¼þµÄÔªËØ Ö§³ÖIE FireFox

<html>
<head>
<mce:script type="text/javascript"><!--
function myclick(event){
var ev =event.srcElement ? event.srcElement : event.target;
}

// --></mce:script>
......

javascriptѧϰ·½·¨

 1.²»¹ýÎÒ½ÌÄãÒ»¸öѧ×öÍøÒ³µÄ¼¼ÇÉ
ÿ¿´µ½Ò»¸öƯÁÁµÄÍøÒ³¾Í²é¿´Ï´úÂë
2.¿´ÕÅТÏéµÄÊÓƵ
3¡£´Ó»ù´¡Ñ§Æð¡£È»ºóѧЩ»ù±¾µÄWEB¿ª·¢Ó¦ÓÃ
ÍƼöÒ»¸öÍøÕ¾http://www.ccscript.cn/
¸ÃÕ¾Ïêϸ·ÖÀàJSµÄ»ù´¡,¶ÔÏó,¼«ÆäÓ¦Óã»
¸ÃÕ¾ÓжàÖÖµ±½ñÁ÷ÐеÄJS¿ò¼Ü£»
Õ¾ÄÚÖ÷´òJquery¿ò¼ÜµÄ»ù´¡¼°Ó¦Óã»
°üÀ¨ÌØЧ´úÂëºÍչʾÌØЧ£» ......

Javascript ÏÔʾ±êǩҳЧ¹û

ҪʵÏÖÕâ¸ö¹¦ÄܹؼüÊÇÒªÀí½â¿éµÄdisplayÊôÐÔ¡£Ò»¸ö¿éµÄdisplayÊôÐÔÉèΪnone£¬¾ÍÏ൱ÓÚÕâ¸ö¿é²»´æÔÚ¡£ËùÒÔ½«ÒªÏÔʾµÄ¶à¸ö¿éµÄdisplayÊôÐÔÉèΪnone,ÔÙ¸ù¾ÝÐèÒª½«ÒªÏÔʾµÄ¿éµÄdisplayÊôÐÔÉèΪblock¾Í¿ÉÒÔ×ö³ö±êǩҳЧ¹ûÁË¡£
£¨1£©      ½¨±êÇ©ÌâÒÔ¼°¸÷±êÇ©ÌâËù¶ÔÓ¦µÄÏÔʾÄÚÈÝ£º
<span id="span1 ......

javascript ¸÷Öֵõ½ä¯ÀÀÆ÷¿í¶ÈºÍ¸ß¶ÈµÄº¯Êý

function getInfo()
{
    var s = "";
    s += " ÍøÒ³¿É¼ûÇøÓò¿í£º"+ document.body.clientWidth+"\n";
    s += " ÍøÒ³¿É¼ûÇøÓò¸ß£º"+ document.body.clientHeight+"\n";
    s += " ÍøÒ³¿É¼ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ