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

ÔÚjavascriptÖлñÈ¡ÖÐÓ¢ÎÄ×Ö·û³¤¶ÈµÄÎÊÌâ


ÔÚjavascriptÖлñÈ¡ÖÐÓ¢ÎÄ×Ö·û³¤¶ÈµÄÎÊÌâ
var i="Öйúa";
Ò»°ãÇé¿öÏ£¬ÎÒÃÇÓÃi.length»áµÃµ½½á¹û3
µ«ÓÐʱºòÎÒÃÇÐèÒª5£¬ÏÂÃæµÄС´úÂë¿ÉÒÔ½â¾öÎÊÌâ
Java´úÂë
 1. <script>     
 2.  alert (fucCheckLength("Öйúaaaa"));     
 3.  function fucCheckLength(strTemp)     
 4. {     
 5.  var i,sum;     
 6.  sum=0;     
 7.  for(i=0;i<strTemp.length;i++)     
 8.  {     
 9.   if ((strTemp.charCodeAt(i)>=0) && (strTemp.charCodeAt(i)<=255))     
10.    sum=sum+1;     
11.   else     
12.    sum=sum+2;     
13.  }     
14.  return sum;     
15. }     
16.  </script>    


Ïà¹ØÎĵµ£º

JavascriptµÄhistory¶ÔÏó

history¶ÔÏó3¸ö·½·¨back()¡¢forward()ºÍgo()£¬ÕâЩ·½·¨¿ÉÒÔµ÷ÓÃÀúÊ·±íÖаüº¬µÄÎĵµ¡£
back()·½·¨×°ÈëÀúÊ·±íÖеÄÇ°Ò»¸öÒ³Ã棬µÈЧÓÚä¯ÀÀÆ÷ÖеÄBack°´Å¥
forward()·½·¨×°ÈëÀúÊ·±íÖеĺóÒ»¸öÒ³Ã棬µÈЧÓÚä¯ÀÀÆ÷ÖеÄForward°´Å¥
go()·½·¨½øÈëÀúÊ·±íÖеÄÌض¨Îĵµ£¬¿ÉÒÔÈ¡ÕûÐβÎÊý»ò×Ö·û´®²ÎÊý
go(n)n>0ʱ£¬×°ÈëÀúÊ·±íÖÐµÄ ......

C#´úÂëÓëjavaScriptº¯ÊýµÄÏ໥µ÷ÓÃ

C#´úÂëÓëjavaScriptº¯ÊýµÄÏ໥µ÷ÓÃ
ÎÊ£º
1.ÈçºÎÔÚJavaScript·ÃÎÊC#º¯Êý?
2.ÈçºÎÔÚJavaScript·ÃÎÊC#±äÁ¿?
3.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptµÄÒÑÓбäÁ¿?
4.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptº¯Êý?
ÎÊÌâ1´ð°¸ÈçÏ£º
javaScriptº¯ÊýÖÐÖ´ÐÐC#´úÂëÖеĺ¯Êý£º
·½·¨Ò»£º1¡¢Ê×ÏȽ¨Á¢Ò»¸ö°´Å¥£¬ÔÚºǫ́½«µ÷Óûò´¦ÀíµÄÄÚÈÝдÈëbutton_clickÖÐ ......

¡¶Îò͸javascript¡·Ñ§Ï°±Ê¼Ç£º¶þ¡¢»Ø¹é¼òµ¥

ÒýÑÔ
 
ÒªÀí½â JavaScript£¬ÄãµÃÊ×ÏÈ·Å϶ÔÏóºÍÀàµÄ¸ÅÄ»Øµ½Êý¾ÝºÍ´úÂëµÄ±¾Ô­¡£Ç°Ãæ˵¹ý£¬±à³ÌÊÀ½çÖ»ÓÐÊý¾ÝºÍ´úÂëÁ½ÖÖ»ù±¾ÔªËØ£¬¶øÕâÁ½ÖÖÔªËØÓÖÓÐמÀ²ø²»ÇåµÄ¹Øϵ¡£JavaScript¾ÍÊÇ°ÑÊý¾ÝºÍ´úÂ붼¼ò»¯µ½×îԭʼµÄ³Ì¶È¡£
 
»ù±¾ÀàÐÍ
Ò»¡¢¼òµ¥Êý¾ÝÀàÐÍ£ºundefined¡¢null¡¢boolean¡¢number¡¢string£¨×¢Ò⣺¶¼Ê ......

javascriptʵÏÖÏñjava¡¢c#Ö®ÀàµÄsleepÔÝÍ£µÄº¯Êý¹¦ÄÜ

ÎÒÃǶ¼ÖªµÀjava¡¢c#¡¢vbµÈÓïÑÔ¶¼ÓÐsleepÔÝÍ£µÄº¯Êý£¬¶øJavaScript½Å±¾Ã»ÓÐÀàËƵŦÄÜ¡£
ÏÂÃæ¾ÍÊÇÎÒµÄʵÏֵķ½·¨£º
<mce:script type="text/javascript"><!--
function test()
{
var s="javascript--ÔÝÍ£º¯Êý";
setTimeout(
function(){
eval(sleep(test)); //Ö´ÐÐreturnÖ®ºóµÄ´úÂ룬Ҳ¾ÍÊÇ&ldq ......

JavaScript ÕýÔò±í´ïʽÌæ»»

¼òµ¥µÄÀý×Ó£¬×Ô¼º¿´¿´£¬Ê¡µÃÒÔºóÀÏÊÇÈ¥ÕÒÁË¡£
<script language="javascript">
//ÓÃÕýÔòÌæ»»½«XÌæ»»³Éy
var s="daxdasx";//Ô­×Ö·û´®
var k="x";//±»Ìæ»»µÄ×Ö¶Î
var re = new RegExp(k,"g");
alert("Ì滻ǰ×Ö·û´®Îª£º"+s);
s = s.replace(re,"y");
alert("Ìæ»»ºó×Ö·û´®Îª£º"+s);
</script> ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ