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

JavaScript ÕÚÕֲ㠵¯³ö¿ò

<script type="text/javas
cript">
var docEle = function() {
    return document.getElementById(arguments[0]) || false;
}
function openNewDiv(_id){
    var m = "mask";
    if (docEle(_id)) document.body.removeChild(docEle(_id));
    if (docEle(m)) document.body.removeChild(docEle(m));
    //maskÕÚÕÖ²ã
    var newMask = document.createElement("div");
    newMask.id = m;
    newMask.style.position = "absolute";
    newMask.style.zIndex = "1";
    _scrollWidth = Math.max(document.body.scrollWidth,document.documentElement.scrollWidth);
    _scrollHeight = Math.max(document.body.scrollHeight,document.documentElement.scrollHeight);
    newMask.style.width = _scrollWidth + "px";
    newMask.style.height = _scrollHeight + "px";
    newMask.style.top = "0px";
    newMask.style.left = "0px";
    newMask.style.background = "yellow";
    newMask.style.filter = "alpha(opacity=40)";
    newMask.style.opacity = "0.40";
    document.body.appendChild(newMask);
    //е¯³ö²ã
    var newDiv = document.createElement("div");
    newDiv.id = _id;
    newDiv.style.position = "absolute";
    newDiv.style.zIndex = "9999";
    newDivWidth = 400;
    newDivHeight = 200;
    newDiv.style.width = newDivWidth + "px";
    newDiv.style.height = newDivHeight + "px";
    newDiv.style.top = (document.body.scrollTop + document.body.clientHeight/2 - newDivHeight/2) + &quo


Ïà¹ØÎĵµ£º

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

µÚ6ÕÂ
 
Êý×é
Êý×éÊÇÒ»¶ÎÏßÐÔ·ÖÅäµÄÄڴ棬Ëüͨ
¹ýÕûÊýÈ¥¼ÆËãÆ«ÒƲ¢·ÃÎÊÆäÖеÄÔªËØ¡£Êý×é¿ÉÒÔÊǺܿìµÄÊý¾Ý½á¹¹¡£²»ÐÒµÄÊÇ£¬
JavaScript
µÄÊý×é²»ÊÇÕâÑùµÄ¡£ËüÌṩÁËÒ»ÖÖÓµÓÐÀàËÆÊý×éÌØÐԵĶÔÏó¡£Ëü°ÑÊý×éµÄϱêת±ä³É×Ö·û´®£¬ÓÃÆä×÷ΪÊô
ÐÔ¡£ËüÃ÷ÏԵرÈÒ»¸öÕæÕýµÄÊý×éÂý£¬µ«Ëü¿ÉÒÔ¸ü·½±ãµØʹÓá£ÊôÐԵļìË÷ºÍ¸ü ......

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

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

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

http://blog.csdn.net/mouyong/archive/2009/11/21/4847303.aspx
µÚ3Õ  ¶ÔÏó
JavaScriptµÄ¼òµ¥ÀàÐÍ°üÀ¨Êý×Ö¡¢×Ö·û´®¡¢²¼¶ûÖµ£¨trueºÍfalse£©¡¢nullÖµºÍundefinedÖµ¡£ÆäËûËùÓеÄÖµ¶¼ÊǶÔÏó¡£Êý×Ö¡¢×Ö·û´®ºÍ²¼¶ûÖµ“òËÆ”¶ÔÏó£¬ÒòΪËüÃÇÓµÓз½·¨£¬µ«ËüÃÇÊDz»¿É±äµÄ¡£JavaScriptÖеĶÔÏóÊǿɱäµÄ¼ü-Öµ ......

javascript»ñµÃurl²ÎÊý

Ò»¡¢
<script type="text/javascript">
function GetUrlParms()   
{
    var args=new Object();  
    var query=location.search.substring(1);//»ñÈ¡²éѯ´®  
    var pairs=query.split("&");//ÔÚ¶ººÅ´¦¶Ï¿ª&nbs ......

Javascript ÑÓ³Ùº¯Êý

function Pause(obj, pSecond) {
/*ÀûÓÃwindow.eventListϵͳ¶ÔÏóÀ´´«µÝTestÕâ¸öÈõ¶ÔÏó£¬ÕâÊÇÓÉÓÚÄãµÄº¯ÊýÓпÉÄÜÊÇ´ø²ÎÊýµÄ¡£
ÓÉÃæÏò¶ÔÏóµÄ˼Ï룬´«µÝ²ÎÊý¾¡Á¿²»Òª²ÉÓÃÈ«¾Ö±äÁ¿£¬ÒòΪÄãµÄ¶ÔÏóÓпÉÄÜÓÐ1¸öÒ²ÓпÉÄÜÓÐn¸ö£¬¶ø
ÓÐЩʱºòËù´´½¨¶ÔÏóµÄ¸öÊý²¢²»ÊÇÄãÊÂÏÈ¿ÉÒÔÖªµÀµÄ£¬ÄÇôҪ´´½¨È«¾Ö±äÁ¿µÄ¸öÊý×ÔÈ»ºÜÄÑÅжÏÁË ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ