javascript ¿çÎĵµµ÷Óü¼Êõ
ÕâÊÇÒ»ÖÖºÜÓÐǰ;µÄ¼¼Êõ£¬¿ÉϧÉú²»·êʱ£¬IE¸Õ´ò¿åÍø¾°£¬»ðºüÓÖð³öÀ´ÁË¡£ÕâÖÖ¼¼ÊõÊÇÎÒÔÚÉè¼Æ³¬¼¶Êý×é¶ÔÏóʱ·¢Ïֵġ£ÓÉÓÚÖ±½Ó¼Ì³ÐÔÉúÊý×éÎÊÌâ¶à£¬ÎÒÖ»ÓÐÓÃObjectÓëArrayµÄÔÐÍ·½·¨¹¹½¨Ò»¸öÐÂÀà¡£²»ÓÃ˵£¬Ð§Âʲ»Ì«ÀíÏë¡£Ö±µ½ÎÒÒѰѳ¬¼¶Êý×éÕéÖÁÍêÃÀµÄ½ñÌ죬ÎÒ»¹ÔÚ²»¶ÏÑ°ÕÒеÄÌæ´ú·½°¸£¬ÓÚÊÇÎÒ¾ÍÏëµ½ÓÃÁíÒ»¸öÎĵµµÄÊý×é¶ÔÏóÀ´¹¹½¨¡£¾²âÊÔ£¬IEÏÂÊÇÍêÃÀµÄ¡£ºóÀ´ÎÒÓÖ·¢ÏÖÔçÔÚ2006Äêȫ֪ȫÄܵÄDE´óÉñÔçÒÑ×öÁËÕâÑùµÄ̽Ë÷£¬ÔÚ¡¶How To Subclass The JavaScript Array Object¡·ÖÐÓ¦ÓÃÕâÖÖ¼¼Êõ£¬ÎÒÖ»²»¹ýÊÇÖØаÑËü·¢ÍÚ³öÀ´¶øÒÑ¡£µ«ÊÇ£¬ÒÔºó¾ÍûÓÐÏÂÎÄÁË£¬DE´óÉñÔÚËûµÄBase2Àà¿â¹¹½¨Array2¶ÔÏóʱҲûÓÐÓ¦ÓÃÕâÖÖ¼¼Êõ¡£²»Ã÷ÕæÏàµÄÎÒһͷÔúÏÂÈ¥£¬°¥Ñ½£¡DE´óÉñÄãÕ滵£¬ÓÐÏÝÚåÒ²²»Í¨±¨Éù£¡
ÏÂÃæ¾ÍÄÃDE´óÉñµÄÀý×Ó¸Äһϣ¬ÑÝʾ¾¿¾¹³öÁËʲô״¿ö£¿£¡
window.onload = function(){
//´´½¨Ò»¸öiframe
var iframe = document.createElement("iframe");
iframe.style.display = "none";
document.body.appendChild(iframe);
// È¡µÃiframeÎĵµµÄÊý×é¶ÔÏó
frames[frames.length - 1].document.write(
"<script>parent.Array2 = Array;<\/script>");
var a = Array2(1,2,3,4),
b = a.slice(2)
alert(b instanceof Array)//Íò¶ñµÄsafariÓëfirefox×ÜÊÇÊÔͼ°ÑɳÏäÎĵµµÄÊý×éʵÀýת»¯Îª±¾µØÎĵµµÄÊý×éʵÀý
a.push(5);
alert(a instanceof Array)//ͬÉÏ£¬safariÓëfirefoxÊÜÓ°ÏìµÄ·½·¨ÊÇËùÓзµ»ØÊý×éµÄ·½·¨¡¡ÔÎ
}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta content="IE=8" http-equiv="X-UA-Compatible"/>
<title>¿çÎĵµµ÷Óà by ˾ͽÕýÃÀ </title>
<script type="text/javascript">
window.onload = function(){
//´´½¨Ò»¸öiframe
var iframe = document.createElement("iframe");
iframe.style.display = "none";
document.body.appendChild(iframe);
// È¡µÃiframeÎĵµµÄÊý×é¶ÔÏó
frames[frames.length - 1].document.write(
"<script>parent.Array2 = Array;<\/script>");
var a = Array2(1,2,3,4),
b = a.slice(2
Ïà¹ØÎĵµ£º
JavaScript ÊÇʲ÷᣿
JavaScript ÊÇÒ»ÖÖеÄÃèÊöÓïÑÔ£¬´ËÒ»ÓïÑÔ¿ÉÒÔ±»óéÈë HTML µÄÎļþÖ®ÖС£
͸¹ý JavaScript ¿ÉÒÔ×öµ½»ØӦʹÓÃÕßµÄÐèÇóʼþ (È磺 form µÄÊäÈë) ¶ø²»ÓÃÈκεÄÍø·
À´»Ø´«Êä×ÊÁÏ£¬ËùÒÔµ±Ò»Î»Ê¹ÓÃÕßÊäÈëÒ»Ïî×ÊÁÏʱ£¬Ëü²»Óþ¹ý´«¸øËÅ·þ¶Ë (server)
´¦Àí£¬ÔÙ´«»ØÀ´µÄ¹ý³Ì£¬¶øÖ±½Ó¿ÉÒÔ±»¿Í»§¶Ë (c ......
ÕÅТÏêjavascript½²×ù±Ê¼ÇÒ»
ÊÕ²Ø
< type="text/javascript">
document.body.oncopy = function() {
if (window.clipboardData) {
......
µÚËļ¯
--------------------------------------------------------------------------------
ÕâÕÂÎÒ½«¸æËßÄúÈçºÎÔÚ״̬ÁÐ (statusbar) (Ò²¾ÍÊÇÄúä¯ÀÀÆ÷×îÏ·½ÏÔʾ URLs µÄÄÇÒ»ÐÐ) ÏÔʾÎÄ×Ö£¬²¢ÇÒ½«½ÌÄú 'ÅÜÂíµÆ' (ÒÔϼò³Æ scroller ) µÄ¹¤×÷ÔÀí¡£ËäÈ»ÒÔ
JavaScript Íê³ÉµÄ scroller Ä¿Ç°ÈÔÓÐЩÎÊÌâ (ÉÔáá»áÌáµ½ÎÊÌâÔ ......
constructorÊôÐÔʼÖÕÖ¸Ïò´´½¨µ±Ç°¶ÔÏóµÄ¹¹Ô캯Êý¡£±ÈÈçÏÂÃæÀý×Ó£º
// µÈ¼ÛÓÚ var foo = new Array(1, 56, 34, 12);
var arr = [
1
,
56
,
34
,
12
];
console.log(arr.constructor === Array); ......
Ò»Ö±Ïë¶ÔJavascriptÔÙ´Î×öһЩ×ܽᣬÕýºÃ×î½ü×Ô¼ºÐ´ÁËÒ»¸öСÐÍJs
UI¿â£¬×ܽáÁËÒ»ÏÂJsµÄ¼Ì³Ð»úÖÆ£¬ÔÚÍøÉÏÒ²¿´ÁËһЩǰ±²ÃDz©¿ÍÀïµÄ×ܽᣬ¸Ð¾õ·ÖÎö²»ÊÇÌرðÈ«Ãæ¡£ÕâÀï½ö½öÊÇ°Ñ×Ô¼ºµÄѧϰÌå»áÄóöÀ´·ÖÏíһϣ¬Ï£Íû¶Ô´ó¼Ò
ѧϰJavascriptÓÐËù°ïÖú¡£
Javascript±¾ÉíÊÇ´ÓPerlÓïÑÔµÄÓï·¨Ñݱä¶øÀ´µÄ£¬±¾ÖÊÉÏÊǽű¾ÓïÑÔ ......