javascriptµÄϵͳº¯Êý
javascriptµÄϵͳº¯Êý
1£¬encodeURI·½·¨
·µ»Ø¶ÔÒ»¸öURI×Ö·û´®±àÂëÖеĽá¹û£¬±¾ÖÊÊÇUTF-8±àÂë
eg:
var urlStr = encodeURI('http://fanli.qq.com/index.html?a=ddd&msg=Öйú');
alert(urlStr);
2, decodeURI·½·¨
¶ÔURI±àÂë½øÐнâÂë³Â×î³õʼµÄ×Ö·û´®²¢·µ»Ø
3£¬parseInt·½·¨
½«Ò»¸ö×Ö·û´®°´Ö¸¶¨µÄ½øÖÆת»»³ÉÒ»¸öÕûÊý
parseInt(numString, [radix])¡£Èç¹ûûÓÐÖ¸¶¨µÚ¶þ¸ö²ÎÊý£¬Ôòǰ׺Ϊ'0x'µÄ×Ö·û´®±»ÊÓΪʮÁù½øÖÆ£¬Ç°×ºÎª'0'µÄ×Ö·û´®±»ÊÓΪ°Ë½øÖÆ
ËùÓÐÆäËûµÄ×Ö·û´®¶¼±»ÊÓΪʮ½øÖÆ¡£ÈȺ¬ÓзÇÊý×ÖµÄ×Ö·û´®£¬ÔòֻȡǰÃæÊý×Ö²¿·Ö½øÖƽøÐÐת»»¡£
eg:
parseInt('123abc',10); //½á¹ûΪ123
4£¬parseFloat·½·¨£ºÈôת»»Ê§°Ü£¬Ôò·µ»ØNaN
5£¬isNaN·½·¨ ---ÓµÓмì²âparseIntºÍparseFloat·½·¨µÄ·µ»ØÖµÊÇ·ñÊÇNaN (Not a Number)
×¢Ò⣺ÅжÏÒ»¸öÊýÊÇ·ñÊÇNaN²»ÄÜÕâÑù£¬if(xx == NaN)£¬Ö»ÄÜÓø÷½·¨½øÐÐÅжϣ¬È磺
alert(NaN == NaN); //·Ç³£Ææ¹Ö£¬ÕâÀïµÄ½á¹ûÊÇfalse
alert(isNaN(NaN)); //true
6£¬escape·½·¨
·µ»Ø¶ÔÒ»¸ö×Ö·û´®½øÐбàÂëºóµÄ½á¹û×Ö·û´®¡£ËùÓеĿոñ£¬±êµã£¬ÖØÒô·ûºÅÒÔ¼°ÈκÎÆäËûÈËASCII×Ö·û¶¼ÓÃ%xx±àÂëÌæ»»¡£ÆäÖÐxxµÈÓÚ±íʾ¸Ã×Ö·ûµÄUnicode×Ö·û¼¯µÄ±àÂëµÄÊ®Áù½øÖÆ£¬×Ö·ûÖµ´óÔ¼255µÄ×Ö·û¾ùÓÃ%uxxxx¸ñʽ½øÐбíʾ¡£
7£¬unescape·½·¨
½«Ò»¸öescape·½·¨±àÂëµÄ½á¹û×Ö·û´®½âÂë³ÂÔʼ×Ö·û´®²¢·µ»Ø¡£
8£¬eval·½·¨
½«ÆäÖеIJÎÊý×Ö·û´®×÷Ϊһ¸öjavascript±íʾʽ½øÐÐÖ´Ðв¢·µ»Ø½á¹û¡£
Ïà¹ØÎĵµ£º
À´Ô´£ºhttp://blog.csdn.net/yjq8116/archive/2008/11/04/3219993.aspx
·½·¨Ö÷ÒªÓÐÈýÖÖ
ת»»º¯Êý¡¢Ç¿ÖÆÀàÐÍת»»¡¢ÀûÓÃjs±äÁ¿ÈõÀàÐÍת»»¡£
1. ת»»º¯Êý
jsÌṩÁËparseInt()ºÍparseFloat()Á½¸öת»»º¯Êý¡£Ç°Õß°Ñֵת»»³ÉÕûÊý£¬ºóÕß°Ñֵת»»³É¸¡µãÊý¡£Ö»ÓжÔStringÀàÐ͵÷ÓÃÕâЩ·½·¨£¬ÕâÁ½¸öº¯Êý²ÅÄÜÕýÈ·ÔËÐУ»¶ÔÆäËûÀàÐÍ·µ» ......
ÔÚVisual StudioÖУ¬ËùÓеÄASP.NET 2.0¿Ø¼þ¶¼ÊÇ×Ô¶¨Òå¿Ø¼þ£¬´´½¨×Ô¼ºµÄ×Ô¶¨Òå¿Ø¼þÒ»°ãÐèÒªÍê³ÉÒÔÏÂÈý²½¡£
(1)ÔÚÕ¾µãAPP_CodeÏ´´½¨Ò»¸öÐÂÀࣻ
(2)ÐÞ¸ÄÕâ¸öÀ࣬ÈÃËü³ÉΪWebControlÀà(°üº¬ÔÚSystem.Web.UI.WebControlsÃüÃû¿Õ¼ä)µÄÅÉÉúÀࣻ
(3)ÖØд»ùÀà(¼´WebControlÀà)µÄRenderContents()·½·¨¡£
ÏÂÃæÊÇÒ»¸ö×î¼òµ¥µÄASP.NE ......
function openCheck()
{
if (!this.external)
{
app.alert("Acrobat¤Ç¤Ï実ÐФǤ¤Þ¤»¤ó");
this.closeDoc(true);
// var myDoc = event.target;
// myDoc.closeDoc(true);
}
}
openCheck();
ÐèҪעÒâµÄÊÇ:
1. ÉÏÊöµÄsourceÖ»ÄÜÔÚPDF ÓÃAcrobat Reader´ò¿ªÊ±²ÅÆð×÷ÓÃ,
ÈçÓÃIEµÈ´ò¿ªÊ±»á±¨¡¸NotSu ......
×î½üµÄÏîÄ¿¿ª·¢ÖÐ Óöµ½Ò»Ð©ÐèÒª¸ù¾Ý¾ßÌåÇé¿ö¶¯Ì¬Ìí¼ÓjavaScript½Å±¾£¬È»ºóÖ´Ðнű¾ ÓÚÊÇÊÕ¼¯ÁËһϣº
1 ÔڿؼþµÄ°ó¶¨Ê¼þÖÐÌí¼Ó½Å±¾ È磺ÔÚgridview¿Ø¼þµÄrowdatabindʼþÖпÉÒÔʵÏÖ Ö¸ÕëµÄÑ¡ÖÐÐв»Í¬É«ÏÔʾ ¿ÉÌí¼Ó½Å±¾
protected void gvEngineerRepairState_RowDataBound(object sender, GridViewRowEventArgs e ......
ÖÐÎıàÂ룺
function upload() {
var form = document.getElementById('topic');
if ($('uploadfile').value == "") {
alert("ÇëÑ¡ÔñÎļþ£¡");
return;
}
$('uploadfile').value = escape($('uploadfile').value) ......