ÔÚ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>
Ïà¹ØÎĵµ£º
history¶ÔÏó3¸ö·½·¨back()¡¢forward()ºÍgo()£¬ÕâЩ·½·¨¿ÉÒÔµ÷ÓÃÀúÊ·±íÖаüº¬µÄÎĵµ¡£
back()·½·¨×°ÈëÀúÊ·±íÖеÄÇ°Ò»¸öÒ³Ã棬µÈЧÓÚä¯ÀÀÆ÷ÖеÄBack°´Å¥
forward()·½·¨×°ÈëÀúÊ·±íÖеĺóÒ»¸öÒ³Ã棬µÈЧÓÚä¯ÀÀÆ÷ÖеÄForward°´Å¥
go()·½·¨½øÈëÀúÊ·±íÖеÄÌض¨Îĵµ£¬¿ÉÒÔÈ¡ÕûÐβÎÊý»ò×Ö·û´®²ÎÊý
go(n)n>0ʱ£¬×°ÈëÀúÊ·±íÖÐµÄ ......
C#´úÂëÓëjavaScriptº¯ÊýµÄÏ໥µ÷ÓÃ
ÎÊ£º
1.ÈçºÎÔÚJavaScript·ÃÎÊC#º¯Êý?
2.ÈçºÎÔÚJavaScript·ÃÎÊC#±äÁ¿?
3.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptµÄÒÑÓбäÁ¿?
4.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptº¯Êý?
ÎÊÌâ1´ð°¸ÈçÏ£º
javaScriptº¯ÊýÖÐÖ´ÐÐC#´úÂëÖеĺ¯Êý£º
·½·¨Ò»£º1¡¢Ê×ÏȽ¨Á¢Ò»¸ö°´Å¥£¬ÔÚºǫ́½«µ÷Óûò´¦ÀíµÄÄÚÈÝдÈëbutton_clickÖÐ ......
ÒýÑÔ
ÒªÀí½â JavaScript£¬ÄãµÃÊ×ÏÈ·Å϶ÔÏóºÍÀàµÄ¸ÅÄ»Øµ½Êý¾ÝºÍ´úÂëµÄ±¾Ô¡£Ç°Ãæ˵¹ý£¬±à³ÌÊÀ½çÖ»ÓÐÊý¾ÝºÍ´úÂëÁ½ÖÖ»ù±¾ÔªËØ£¬¶øÕâÁ½ÖÖÔªËØÓÖÓÐמÀ²ø²»ÇåµÄ¹Øϵ¡£JavaScript¾ÍÊÇ°ÑÊý¾ÝºÍ´úÂ붼¼ò»¯µ½×îÔʼµÄ³Ì¶È¡£
»ù±¾ÀàÐÍ
Ò»¡¢¼òµ¥Êý¾ÝÀàÐÍ£ºundefined¡¢null¡¢boolean¡¢number¡¢string£¨×¢Ò⣺¶¼Ê ......
ÎÒÃǶ¼ÖªµÀjava¡¢c#¡¢vbµÈÓïÑÔ¶¼ÓÐsleepÔÝÍ£µÄº¯Êý£¬¶øJavaScript½Å±¾Ã»ÓÐÀàËƵŦÄÜ¡£
ÏÂÃæ¾ÍÊÇÎÒµÄʵÏֵķ½·¨£º
<mce:script type="text/javascript"><!--
function test()
{
var s="javascript--ÔÝÍ£º¯Êý";
setTimeout(
function(){
eval(sleep(test)); //Ö´ÐÐreturnÖ®ºóµÄ´úÂ룬Ҳ¾ÍÊÇ&ldq ......
¼òµ¥µÄÀý×Ó£¬×Ô¼º¿´¿´£¬Ê¡µÃÒÔºóÀÏÊÇÈ¥ÕÒÁË¡£
<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> ......