JavaScript ÅжÏä¯ÀÀÆ÷ÀàÐͼ°°æ±¾
$(document).ready(function() {
var Sys = {};
var ua = navigator.userAgent.toLowerCase();
if (window.ActiveXObject)
Sys.ie = ua.match(/msie ([\d.]+)/)[1]
else if (document.getBoxObjectFor)
Sys.firefox = ua.match(/firefox\/([\d.]+)/)[1]
else if (window.MessageEvent && !document.getBoxObjectFor)
Sys.chrome = ua.match(/chrome\/([\d.]+)/)[1]
else if (window.opera)
Sys.opera = ua.match(/opera.([\d.]+)/)[1]
else if (window.openDatabase)
Sys.safari = ua.match(/version\/([\d.]+)/)[1];
//ÒÔϽøÐвâÊÔ
if (Sys.ie) $("#llq").html("IE:" + Sys.ie);
if (Sys.firefox) $("#llq").html("Firefox: " + Sys.firefox);
if (Sys.chrome) $("#llq").html('Chrome: ' + Sys.chrome);
if (Sys.opera) $("#llq").html('Opera: ' + Sys.opera);
if (Sys.safari) $("#llq").html('Safari: ' + Sys.safari);
})
Ïà¹ØÎĵµ£º
ÔÚsilverlight¿ª·¢ÖУ¬ÎÒÃÇ¿ÉÒÔʹÓÃjsÀ´µ÷ÓÃsilverlightÖеķ½·¨£¨µ±È»·½·¨ÉÏÒªÀ¦°óÏàÓ¦ÊôÐÔ£©£¬Ò²¿ÉÒÔ½«Ö¸¶¨
µÄjs·½·¨°ó¶¨µ½silverlightÓ¦ÓÃÖеÄʼþÉÏ£®±¾DEMOÑÝʾÁËͨ¹ýjsµ÷ÓÃÍê³ÉsilverlightÊý¾ÝÁбí¿Ø¼þ(DataGrid)µÄÊý
¾Ý°ó¶¨²Ù×÷£¬²¢Í¨¹ýDataGridµÄEmployeeList_BeginningCellEditʼþ½«µ±Ç°Ñ¡È¡µÄÊý¾ÝÐÐÐÅÏ¢·µ»Øµ½ ......
×î½ü̫æ,ûÓÐʱ¼ä×ܽṤ×÷ÄÚÈÝÁË,æÀï͵ÏаÉ,¹²ÏíÏÂÎÒµÄJavaScript MD5 ½Å±¾
var hex_chr = "0123456789abcdef";
function rhex(num)
{
str = "";
for(j = 0; j <= 3; j++)
str += hex_chr.charAt((num >> (j * 8 + 4)) & 0x0F) +
hex_chr.charAt((num >> (j * 8)) & 0x0F);
re ......
YUI Compressor ѹËõ JavaScript µÄÄÚÈÝ°üÀ¨£º
ÒƳý×¢ÊÍ
ÒƳý¶îÍâµÄ¿Õ¸ñ
ϸ΢ÓÅ»¯
±êʶ·ûÌæ»»£¨Identifier Replacement£©
YUI Compressor °üÀ¨ÄÄЩϸ΢ÓÅ»¯ÄØ£¿
object["property"] £¬Èç¹ûÊôÐÔÃûÊǺϷ¨µÄ JavaScript ±êʶ·û£¨×¢£ººÏ·¨µÄ JavaScript ±êʶ·û——ÓÉÒ»¸ö×Öĸ¿ªÍ·£¬ÆäºóÑ¡ÔñÐԵؼÓÉÏÒ»¸ö»òÕ ......
var sDate = new Date(Date.UTC(arys[0], arys[1] - 1, arys[2]));
var eDate = new Date(Date.UTC(arys1[0], arys1[1] - 1, arys1[2]));
......
window.onbeforeunload = function (evt) {
var message = 'Are you sure you want to leave?';
if (typeof evt == 'undefined') {
evt = window.event;
}
if (evt) {
evt.returnValue = message;
}
return message;
}
onbeforeunload ʼþ²Î¿¼µØÖ·
http://msdn.microsoft.com/en-us/ ......