[ת]javascriptÅжÏä¯ÀÀÆ÷ÀàÐÍÓë°æ±¾
ÒªÏëд³ö¿çä¯ÀÀÆ÷µÄjavascript£¬¾Í±ØÐ붮µÃÐá̽¼¼Êõ¡£ÕâÊÇä¯ÀÀÆ÷´óÕ½ÒÅÁôϵĴóµØÀ×£¬ÊÂÒÑÈç´Ë£¬Ö»ºÃÈÏÃü£¬¹Ô¹Ôд·ÖÖ§½á¹¹°É£¬º¯Êý¾ÍÊÇÕâÑù²»Öª²»¾õÖб䳤µÄ¡£
ÏÈ¿´µ¥Ò»ä¯ÀÀÆ÷µÄÅжϣ¬ÎÒÃÇûÓбØÐëÈ¥ÕÒnavigator.userAgentµÄÂé·³£¬ÎÒÔÚ¹úÍâµÄ²©¿ÍÍøÕ¾ÊÕ¼¯ÁËÈçÏÂhack£¬¶ÌС¾«º·£º
ie = !+"\v1" ;
ie ='\v'=='v' ;
ie = 0//@cc_on+1;
ie = !!top.execScript;
ie = /*@cc_on!@*/!1;
ie8 = !!window.XDomainRequest;
//ÎÒ×Ô´´µÄ£¬Èç¹ûÊÇIE£¬»á·µ»Ø6,7,8´ú±íie6,ie7,ie8£¬·ñÔò·µ»Ø1
IEVersion = (" " + (/*@cc_on @_jscript_version @*/-1)).slice(-1)
//»ùÓÚÌõ¼þ±àÒëµÄÐá̽½Å±¾£¬»¹ÓÐÈçϼ¸¸ö£º
IE8=@cc_on @_jscript_version == 5.8 ? true : @false
IE7=@cc_on @_jscript_version == 5.7 ? true : @false
IE6=@cc_on @_jscript_version == 5.6 ? true : @false
IE55=@cc_on @_jscript_version == 5.5 ? true : @false
ff = /a/[-1]=='a';
ff3 = (function x(){})[-5]=='x';
ff2 = (function x(){})[-6]=='x';
safari=/a/.__proto__=='//';
safari = window.openDatabase;
chrome=/source/.test((/a/.toString+''));
opera=!!window.opera ;
opera=/^function (/.test([].sort);
»¹ÓÐÅжÏmaxthonµÄ£º
//³ö´¦£ºhttp://www.cnblogs.com/xiarugu/archive/2009/02/02/1382293.html
function IsMaxthon()
{
try{
window.external.max_invoke("GetHotKey");
return true;
}catch(ex){
return false;
}
}
alert(IsMaxthon());
//³ö´¦£ºhttp://bbs.maxthon.cn/archiver/?tid-148353.html
try{
if(external.max_version.indexOf("1.")==0){
var isMaxthon1 = 1;
}else{
var isMaxthon1 = 0;
}
}catch(e){
&
Ïà¹ØÎĵµ£º
ÔÚsilverlight¿ª·¢ÖУ¬ÎÒÃÇ¿ÉÒÔʹÓÃjsÀ´µ÷ÓÃsilverlightÖеķ½·¨£¨µ±È»·½·¨ÉÏÒªÀ¦°óÏàÓ¦ÊôÐÔ£©£¬Ò²¿ÉÒÔ½«Ö¸¶¨
µÄjs·½·¨°ó¶¨µ½silverlightÓ¦ÓÃÖеÄʼþÉÏ£®±¾DEMOÑÝʾÁËͨ¹ýjsµ÷ÓÃÍê³ÉsilverlightÊý¾ÝÁбí¿Ø¼þ(DataGrid)µÄÊý
¾Ý°ó¶¨²Ù×÷£¬²¢Í¨¹ýDataGridµÄEmployeeList_BeginningCellEditʼþ½«µ±Ç°Ñ¡È¡µÄÊý¾ÝÐÐÐÅÏ¢·µ»Øµ½ ......
°æȨÉùÃ÷£ºÔ´´×÷Æ·£¬ÔÊÐíתÔØ£¬×ªÔØʱÇëÎñ±ØÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕ Ôʼ³ö´¦ ¡¢×÷ÕßÐÅÏ¢ºÍ±¾ÉùÃ÷¡£·ñÔò½«×·¾¿·¨ÂÉÔðÈΡ£http://gzycm520.blog.51cto.com/175220/36822
· ʼþÔ´¶ÔÏó event.srcElement.tagName event.srcElement.type
· ²¶»ñÊÍ·Å event.srcElement.setCapture(); ......
×¢²áºÜ³¤Ê±¼äºÅÁË£¬¸Õ¿ªÍ¨²©¿Í£¬ÄóöÒ»¸ö×Ô¼ºÐ´µÄ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: ......
±äÁ¿µÄ×÷ÓÃÓòÖ¸µÄÊDZäÁ¿µÄ¿É¼ûÐÔ£¬¶øÉúÃüÖÜÆÚÔò£¨´æ»îÆÚ£©ÔòÊÇ´ÓÁíÒ»¸ö½Ç¶È¿¼²ì±äÁ¿¡£ jsÖбäÁ¿µÄ×÷ÓÃÓò·ÖΪȫ¾Ö±äÁ¿ºÍ¾Ö²¿±äÁ¿£¬º¯ÊýÄÚ¶¨ÒåµÄ³ÆΪ¾Ö²¿±äÁ¿£¬º¯ÊýÍâµÄ³ÆΪȫ¾Ö±äÁ¿¡££¨¡°º¯ÊýÍâµÄ³ÆΪȫ¾Ö±äÁ¿¡±ÊÇÏà¶ÔµÄ£¬Áí´Ë´¦ÌÖÂÛµÄÇ°ÌáÊÇÓÃvarÏÔʽÉùÃ÷µÄ±äÁ¿£¬º¯ÊýÄÚ²»ÓÃvar¶¨ÒåµÄ±äÁ¿Ä¬ÈÏÊÇÈ«¾Ö±äÁ¿£¬µ±È»ºöÂÔvarÉùÃ÷± ......