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

·ÅÒ»¸öjavascriptÓÒ¼ü²Ëµ¥µÄ´úÂë

×¢²áºÜ³¤Ê±¼äºÅÁË£¬¸Õ¿ªÍ¨²©¿Í£¬ÄóöÒ»¸ö×Ô¼ºÐ´µÄjavascriptÓÒ¼ü²Ëµ¥£¬¼æÈÝIE£¬firefoxä¯ÀÀÆ÷
ÕâÊÇcss´úÂë
 body{
font-size:12px;
}
.contextMenu{
filter:alpha(opacity=80);
opacity:0.8;
border:1px #0033FF solid;
background-color:#0099CC;
cursor:pointer;
width:120px;
position:absolute;
top:0;
left:0;
font-size:12px;
}
.cmddiv{
padding:2px;
border-bottom:1px #00FF99 dotted;
}
»¹ÓÐjavascript´úÂë
 window.onload=function(){
var contextMenu;
var buttons=['²Ëµ¥1','²Ëµ¥2','²Ëµ¥3','²Ëµ¥4'];
window.document.body.oncontextmenu=function(e){
var xy=getXY(e);
if(typeof contextMenu!="object"){
contextMenu=document.createElement("div");
for(var i=0;i<buttons.length;i++){
var div=document.createElement("div");
var cmd=document.createTextNode(buttons[i]);
div.eventDiv=i;
div.className="cmddiv";
div.appendChild(cmd);
contextMenu.appendChild(div);
}
contextMenu.className="contextMenu";
window.document.body.appendChild(contextMenu);

contextMenu.onclick=function(e){
var e = e||window.event;
var target=e.target||e.srcElement;
alert(target.eventDiv);
}
}
contextMenu.style.display="";
contextMenu.style.top=xy.y+10+"px";
contextMenu.style.left=xy.x+10+"px";
return false;
}
window.document.body.onclick=function(){
if(typeof contextMenu=="object"){
contextMenu.style.display="none";
}
}
var getXY=function(e){
var x,y;
var e = e||window.event;
return {x:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:e.clientY+document.body.scrollTop+document.documentElement.scrollTop};
}
}
 
´úÂëֻдµ½Åжϳöµã»÷µÄÊÇÄǸöÃüÁÖÁÓÚҪʵÏֵĺ¯Êý£¬»¹ÊÇÒª×Ô¼ºÐ´µÄ


Ïà¹ØÎĵµ£º

javascriptЧÂʾ­Ñé̸(Ò»)

±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔ­À´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾­Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾­¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷Ô­Òò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......

javascript ͼƬ Ìí¼Ó Öл®Ïß

<html>
<head>
<mce:style><!--
.tvline{width:240px;height:180px;border:0;}
.tvline td{border-top:1 solid #000000;font:1px;filter:alpha(opacity=30)}

--></mce:style><style mce_bogus="1"> .tvline{width:240p ......

ÀûÓÃJavaScriptµ¯³ödiv²ã£¬ÒÔ¼°µÝ¹éµ÷ÓÃ

function BOX_show(e,obj)//ÏÔʾ
{
    if(obj<24)
        document.cookie = "tdid="+obj;
    if(document.getElementById(e)==null)
    {
        return ;
    }
&n ......

silverlightÓëjavascript½»»¥²Ù×÷

ÔÚsilverlight¿ª·¢ÖУ¬ÎÒÃÇ¿ÉÒÔʹÓÃjsÀ´µ÷ÓÃsilverlightÖеķ½·¨£¨µ±È»·½·¨ÉÏÒªÀ¦°óÏàÓ¦ÊôÐÔ£©£¬Ò²¿ÉÒÔ½«Ö¸¶¨
µÄjs·½·¨°ó¶¨µ½silverlightÓ¦ÓÃÖеÄʼþÉÏ£®±¾DEMOÑÝʾÁËͨ¹ýjsµ÷ÓÃÍê³ÉsilverlightÊý¾ÝÁÐ±í¿Ø¼þ(DataGrid)µÄÊý
¾Ý°ó¶¨²Ù×÷£¬²¢Í¨¹ýDataGridµÄEmployeeList_BeginningCellEditʼþ½«µ±Ç°Ñ¡È¡µÄÊý¾ÝÐÐÐÅÏ¢·µ»Øµ½ ......

javascript: ÕýÔò±í´ïʽ

ÕýÔò±í´ïʽ
RegExp(regexp, option)ÀàʵÏÖ,¿ÉÒÔ¼òд³É/regexp/option
option:
g: global, i: ignore case
·½·¨:string.test(regexp),
string.exec(regexp)[·µ»ØËùÓÐÆ¥ÅäµÄµØ·½], string.serch(regexp)[ÕýÔò°æµÄindexOf()],
string.replace(regexp, str|funtion), string.split(regexp)
¼òµ¥Ä£Ê½
Ôª×Ö·û:( [ {
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ