脚 本 之 家 www.jb51.net
页面导航:  不限条件-->如何实现JS函数的重载
本地搜索:
javascript不能支持函数的重载,如下:[code]<script language="JavaScript">function f(length){    alert("高为:"+length);}function f(length,width){    alert("高为:"+length+",宽为:"+width);}</srcipt>[/code]上面那段代码其实是行不通的,因为函数定义时的参数个数和函数调用时的参数个数没有任何关系。 在...
http://www.jb51.net//article/1081.htm
共有:1/10,当前1/1页  [首页] [上一页] 1 [下一页] [尾页] 转到: