Àí½âjavascript argumentsµÄÀý×Ó
±¾ÎÄת×Ô£ºhttp://bbs.51js.com/viewthread.php?tid=85083&extra=page%3D1
ÔÚ×Ô¶¨ÒåµÄº¯ÊýÖУ¬Èç¹ûÒªÏòº¯ÖÐÌύһЩ²ÎÊý£¬Ï°¹ßÐԵشó¼Ò»áÔÚº¯ÊýÖж¨Òå
Àý£º<script>
function test(a,b){
alert(a);
alert(b);
}
test("µÚÒ»´Î","µÚ¶þ´Î")
</script>
ÕâÖÖ¶¨ÒåµÄ·½ÊԱȽÏËÀ°å£¬ÉùÃ÷Á½¸ö²ÎÊý¾ÍÖ»Äܵ÷ÓÃÁ½¸ö²ÎÊý£¬¶øÈç¹ûʹÓÃarguments[]µÄ»°£¬¾Í²»»áÏÞÖÆ£¬Ò²²»ÐèÒªÉùÃ÷²ÎÊý
<script>
function test(){
for(i=0;i<arguments.length;i++){
alert(arguments[i]);
}
}
test("µÚÒ»´Î","µÚ¶þ´Î","µÚÈý´Î","µÚn´Î")
</script>
Ïà¹ØÎĵµ£º
// ä¯ÀÀÆ÷ÏÔʾÇøÓòµÄ¿íºÍ¸ß£¬ÏòÏ»¹ÔºóÖµ»á±äС¡£
document.body.clientWidth;
document.body.clientHeight;
// ÓëÉÏÃæµÄÁ½¸öÖµÏà±È£¬ÎÒ¾õµÃ¾ÍÊǼÓÉÏÁ˹ö¶¯ÌõµÄ¿íºÍ¸ß
document.body.offsetWidth;
document.body.offsetHeight;
// Õû¸öÍøÒ³µÄ¸ß¶ÈºÍ¿í¶È£¬°üÀ¨¹ö¶¯ÌõÖÐûÓÐÏÔʾ³öÀ´µÄ
document.bod ......
ShowModalDialogº¯ÊýµÄ¹¦ÄÜ£º
´ò¿ªÒ»¸ö×Ó´°¿Ú£¬²¢ÇÒ¿ÉÓ븸´°¿ÚÏ໥´«µÝÊý¾Ý£¬ËüÓëwindow.openµÄ×î´óÇø±ð¾ÍÔÚÓÚÓÉShowModalDialog´ò¿ª×Ó´°¿Úºó£¬¸¸´°¿Ú½«²»ÄܲÙ×÷¡£
ʹÓ÷½·¨£º
vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures])
²ÎÊý˵Ã÷£º
sURL
±ØÑ¡²ÎÊý£¬ÀàÐÍ£º×Ö·û´®¡£ÓÃÀ´Ö¸¶¨¶Ô»°¿òÒªÏ ......
WebServiceÎļþ£º
[WebMethod]
public int DoMulti(int num1,int num2)
{
int result;
result = num1 * num2;
return result;
}
ASPXÎļþ£º
<%@ Page language="c#" Codebehind="Javascript.aspx.cs" AutoEventWireup="false" Inherits=" ......
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional ......
"^\d+$"¡¡¡¡//·Ç¸ºÕûÊý£¨ÕýÕûÊý + 0£©
"^[0-9]*[1-9][0-9]*$"¡¡¡¡//ÕýÕûÊý
"^((-\d+)|(0+))$"¡¡¡¡//·ÇÕýÕûÊý£¨¸ºÕûÊý + 0£©
"^-[0-9]*[1-9][0-9]*$"¡¡¡¡//¸ºÕûÊý
"^-?\d+$"¡¡¡¡¡¡¡¡//ÕûÊý
"^\d+(\.\d+)?$"¡¡¡¡//·Ç¸º¸¡µãÊý£¨Õý¸¡µãÊý + 0£©
"^(([0 ......