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

JavaScriptÏÞÖÆtextarea³¤¶È

ÓÉÓÚTEXTAREAûÓÐmaxlength,²»ÄÜÕâÑùÏÞÖÆtextarea³¤¶È£¬ µ«Í¨¹ýJAVASCRIPT ¾ÍÄÜʵÏÖµ½
<mce:script type="text/javascript"><!--

function limitLength(obj, length) {
var desc = obj.value;
obj.value = substr(obj.value,length);
}
function substr(str,length){
var l=0,i=0;
while(l <length && i<str.length){
l+=1;
if(str.substring(i,i+1).match(/[\u4e00-\u9fa5]/))l+=2;//Ò»¸öÖÐÎÄÊÇÏ൱ÓÚ3¸öÓ¢ÎÄ
i+=1;
}
return str.substring(0,i);
}
// --></mce:script>
<textarea name="blogdesc" cols="50" rows="5" onkeyup="limitLength(this,200)">»Ð»Ðã±ã±»Ð»Ðã±ã±»Ð»Ðã±ã±ºÍ
ÊDz»ÊǺܼòµ¥£¿


Ïà¹ØÎĵµ£º

ͨ¹ýJavaScript½øÐÐÑéÖ¤

ʵÀýÈçÏ£ºjavascript.htmlÎļþ
 
<html>
     <head>
          <title>JavaScriptÑéÖ¤</title>
     </head>
 
     <script language='JavaScript'> ......

javascript΢ÐÍÄ£°åϵͳ

ÓÉÓÚºǫ́ģ°åϵͳµÄÇ¿´ó£¬ÈçrailsµÄerb£¬javascriptµÄÄ£°åϵͳһֱ´¦ÓÚ±»´òѹ״̬£¬µ«ÓÖÓÉÓÚºǫ́µÄ¼¼Êõ·¢Õ¹¹ý¿ì£¬ÈÕÐÂÔÂÒ죬ÒÔ¼°AjaxÓ¦ÓõÄÆÕ¼°£¬javascript»¹ÊÇÓÐÒ»½åÖ®µØµÄ¡£ÈçÎÒÃÇÒª´Óºǫ́·µ»ØÒ»¸öHTMLƬ¶Ï£¬µ«ÊÂʵÉÏÎÒÃÇÓÀÔ¶Ö»ÄÜ·µ»ØÎı¾£¨responseText£©»òresponseXML£¬Èç¹ûÄãµÃµ½ÊÇjson£¬Æäʵºǫ́ÒÑÉÔÉÔµ÷ÓÃjavascrip ......

¼¸ÖÖjavascriptº¯Êý¶¨ÒåµÄ²î±ð

javascriptº¯ÊýµÄ¶¨Òå
1£ºµ÷Óùؼü×ÖfunctionÀ´¹¹Ô죬È磺
    function distance(x1,x2,y1,y2)
    {
        var dx=x2-x1;
        var dy=y2-y1;
        return Math ......

[ת]JavaScriptºÍJavaµÄÇø±ð

JavaScriptºÍJavaµÄÇø±ð
¡¡¡¡ËäÈ»JavaScriptÓëJavaÓнôÃܵÄÁªÏµ£¬µ«È´ÊÇÁ½¸ö¹«Ë¾¿ª·¢µÄ²»Í¬µÄÁ½¸ö²úÆ·¡£JavaÊÇSUN¹«Ë¾ÍƳöµÄÐÂÒ»´úÃæÏò¶ÔÏóµÄ³ÌÐòÉè¼ÆÓïÑÔ£¬ÌرðÊʺÏÓÚInternetÓ¦ÓóÌÐò¿ª·¢£»¶øJavaScriptÊÇNetscape¹«Ë¾µÄ²úÆ·£¬ÆäÄ¿µÄÊÇΪÁËÀ©Õ¹Netscape Navigator¹¦ÄÜ,¶ø¿ª·¢µÄÒ»ÖÖ¿ÉÒÔǶÈëWebÒ³ÃæÖеĻùÓÚ¶ÔÏóºÍʼþÇý¶ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ