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

JavascriptÖеÄarguments ¶ÔÏó


function
 fn(a,b,c)
{
    
var
 s 
=
 
""
;
    
var
 i;
    s 
+=
 
"
º¯Êý´«Èë²ÎÊý¸öÊý:
"
 
+
 fn.arguments.length 
+
 
"
\n
"
;
    
for
 (i
=
0
;i
<
fn.arguments.length;i
++
)
    {
        s 
+=
 
"
º¯Êý´«Èë²ÎÊý
"
 
+
 i 
+
"
:
"
 
+
 fn.arguments[i] 
+
 
"
\n
"
;
    }
    s 
+=
 
"
º¯Êýʵ¼Ê²ÎÊý¸öÊý:
"
 
+
 fn.arguments.callee.length 
+
 
"
\n
"
;
    document.all.t.innerText 
=
 s
}


Ïà¹ØÎĵµ£º

дµÄµÚÒ»¸ö½ÏÓÐÒâÒåJavascript³ÌÐò

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>javascript</t ......

$wnd and $doc Calling native JavaScript with JSNI

$wnd and $doc Calling native JavaScript with JSNI
$wnd ÊÇʲô£¿
GWT provides the $wnd and $doc variables to refer to the window and document objects
GWTʹÓÃͨ¹ýJava Native methodʹÓÃËü£¬ÉùÃ÷Ò»¸önative·½·¨£¬½«º¬ÓÐJavaScriptµÄ·½·¨Ìå×¢ÊÍ¡£±àÒëÆ÷½«×¢ÊÍ¿éÄÚµÄÄÚÈÝÖð×ÖÊä³ö£¬Ê¹Ö®Óë±àÒë²úÉúµÄJavaScriptÕûº ......

javascriptÑéÖ¤Îı¾¿òÄÚÈÝ

ÑéÖ¤Îı¾¿òÄÚÈݲ»ÄÜΪ¿Õ
<input onblur="if(this.value.replace(/^ +| +$/g,'')=='')alert('²»ÄÜΪ¿Õ!')">
Ö»ÄÜÊäÈëÓ¢ÎĺÍÊý×Ö
<input onblur="if(/[^0-9a-zA-Z]/g.test(value))alert('Óдí')">
<input onkeyup="value=value.replace(/[^0-9a-zA-Z]/g,'')"/>
<input type="text" onkeyup="value ......

javascriptÊý×éΨһ»¯ÊµÏÖ·½Ê½

ʵÏÖ·½Ê½
ÕâÀï¸ø³ö2ÖÐʵÏÖ·½Ê½¡£Ò»ÖÖÊÇ´ó¼ÒÓ¦¸Ã¶¼ÖªµÀµÄindexOf¼ì²âµÄ·½Ê½£¬ÁíÒ»ÖÖÊǽáºÏlastIndexOfºÍspliceʵÏÖ·½Ê½¡£
//Ê×ÏȸøArray¶ÔÏóÔ­ÐÍÉÏÌí¼ÓindexOfºÍlastIndexOf·½·¨.(Èç¹ûûÓеϰ)
if(!Array.prototype.indexOf){
Array.prototype.indexOf = function(element, index){
var length = this.len ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ