JavaScriptʼþ
JavaScriptʼþ·ÖÀࣺ
1¡¢²¶»ñÐÍ£¨IE²»Ö§³Ö£©£¨´ÓDOM½á¹¹µÄ×¶Ë¿ªÊ¼ÏòÏÂÑÓÉ죩
2¡¢Ã°ÅÝÐÍ£¨´ÓDOM½á¹¹µÄ×îµÍ¶ËÏòÉÏÒ»¼¶¼¶ÑÓÉ죩
¡¾IE7ÒÔÉÏ¿ÉÒÔ¸ø‘html’Ìí¼Óonclickʼþ£¬IEÖÐbody->html£¬»ðºüÖÐhtml->body¡¿
JavaScriptÌí¼Óʼþ¼àÌý£º
1¡¢IE£º
[object].attachEvent("event_handler", fnHandler);
[object].detachEvent("event_handler", fnHandler);
µ±Ìí¼Ó¶à¸öʼþ¼àÌýº¯Êýʱ£¬ºóÌí¼ÓµÄÏȵ÷Ó㬵«²¢·ÇÑϸñÉϵÄÏȺó˳Ðò¡£
2¡¢±ê×¼DOMµÄ¼àÌý·½·¨
[object].addEventListener("event_name", fnHandler, bCapture);
[object].removeEventListener("event_name", fnHandler, bCapture);
µ±Ìí¼Ó¶à¸öʼþ¼àÌýº¯Êýʱ£¬ÏÈÌí¼ÓµÄÏȵ÷Ó㬶øÇÒÑϸñ°´ÏȺó˳ÐòÖ´ÐС£
JavaScriptʼþ¶ÔÏó
ÔÚIE ä¯ÀÀÆ÷ÖÐʼþ¶ÔÏóÊÇwindow ¶ÔÏóµÄÒ»¸öÊôÐÔevent£¬·ÃÎÊʱͨ³£²ÉÓÃÈçÏ·½·¨¡£
oP.onclick = function(){
var oEvent = window.event;
}
¾¡¹ÜËüÊÇwindow ¶ÔÏóµÄÊôÐÔ£¬µ«event ¶ÔÏó»¹ÊÇÖ»ÄÜÔÚʼþ·¢Éúʱ±»·ÃÎÊ£¬ËùÓеÄʼþ´¦Àíº¯ÊýÖ´ÐÐÍêÖ®ºó£¬¸Ã¶ÔÏó¾ÍÏûʧÁË¡£
¶ø±ê×¼µÄDOM Öй涨event ¶ÔÏó±ØÐë×÷ΪΩһµÄ²ÎÊý´«¸øʼþ´¦Àíº¯Êý£¬Òò´ËÔÚÀàËÆFirefox ä¯ÀÀÆ÷ÖзÃÎÊʼþ¶ÔÏóͨ³£½«Æä×÷Ϊ²ÎÊý£¬´úÂëÈçÏ£º
oP.onclick = function(oEvent){
}
Òò´ËΪÁ˼æÈÝÁ½ÖÖä¯ÀÀÆ÷£¬Í¨³£²ÉÓÃÏÂÃæµÄ·½·¨¡£
oP.onclick = function(oEvent){
if(window.event) oEvent = window.event;
}
Ïà¹ØÎĵµ£º
±¾ÎĽéÉÜjavascriptÁ¬½ÓaccessÊý¾Ý¿âµÄ·½·¨¡£Õâ¶Î´úÂëÔÚ±¾µØ¿ÉÒÔÕý³£ÔËÐУ¬ÔÚÏßÔòÐèÒª×ã¹»µÄȨÏÞ¡£ÓÉÓÚ²ÉÓÃAccessÊý¾Ý¿â£¬ËùÒÔ²¢²»Ê¹Óñê×¼µÄSQLÓ﷨ʹÓÃʱ¡£ÐèҪעÒâ¡£
Õ⼸Ìì·ÑÁËͦ´óÁ¦ÆøÔÚÍøÉϲéÕÒjavascriptÁ¬½ÓaccessÊý¾Ý¿âµÄ·½·¨£¬¾¹ýÕûÀí×ܽᣬÖÕÓÚд³öÒ»¶ÎÄܹ»ÓÐЧִÐеĴúÂë¡£
µ«ÊÇÕâ¶Î´úÂëÔÚ±¾µØ¿ÉÒÔÕý³£ÔËÐУ ......
javascript ÅжÏÎļþÊÇ·ñ´æÔÚ
<title>³£ÓÃÏÂÔØ</title>
<script type="text/javascript" >
//ÅжϷþÎñÆ÷ÉϵÄÎļþ£¨ÍøÂçÎļþÊÇ·ñ´æÔÚ£©
function getURL()
&nb ......
with
(object)
statements
²ÎÊý
object
еÄĬÈ϶ÔÏó¡£
statements
Ò»¸ö»ò¶à¸öÓï¾ä£¬object ÊǸÃÓï¾äµÄĬÈ϶ÔÏó¡£
˵Ã÷
with
Óï¾äͨ³£ÓÃÀ´Ëõ¶ÌÌض¨ÇéÐÎϱØÐëдµÄ´úÂëÁ¿¡£ÔÚÏÂÃæµÄÀý×ÓÖУ¬Çë×¢Òâ Math µÄÖظ´Ê¹Óãº
x = Math.cos(3 * Math.PI) + Math.sin(Math.LN10)
y = Math.tan(14 * ......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>FLYSO Blog-- JS´úÂëʵÏÖµÄ×Ô¶¯·ÖҳЧ¹û~!</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT=""& ......
ʵÏÖ¿¨Ò³Ê½webµÄjs£º
function ShowContent(id,num){
for(i=1;i<=num;i++){
document.getElementById("page_"+i).className="";
document.getElementById("content_"+i).style.display="none";
}
document.getElementById("content_"+id).style.display="block";
......