易截截图软件、单文件、免安装、纯绿色、仅160KB

JavaScript 调用表单重置方法


1 history.go(0)  
2 location.reload() (页面进行刷新,但为disabled的元素的值不会被清空)
3 location=location 
4 location.assign(location) 
5 location.replace(location) 
6 from..reset()  (页面不进行刷新,模拟单击对所调用表单重置按钮的单击)


相关文档:

通过javascript获得url参数

页面提交数据一般有两种方法:get,post。post就是所谓的form提交,使用视图;get是通过url提交。
Get方法一般用后台代码(如asp,asp.net)获得参数,代码很简单:Request.QueryString["id"];即可获取。 
有些时候需要直接在前台获取url参数,要用到javascript,js没有直接获取url参数的方法,那么,我们如何通过js ......

[翻译]High Performance JavaScript(023)

Data Formats  数据格式
    When considering data transmission techniques, you must take into account several factors: feature set, compatibility, performance, and direction (to or from the server). When considering data formats, the only scale you need for comparison is speed.
......

[翻译]High Performance JavaScript(028)

JavaScript Minification  JavaScript紧凑
    JavaScript minification is the process by which a JavaScript file is stripped of everything that does not contribute to its execution. This includes comments and unnecessary whitespace. The process typically reduces the file size by ha ......

javascript String.replace函数

    javascript的String类内置函数replace(regexp, newString)函数提供了字符串替换功能,从函数原型上可以看出支持 Regular Exp。此函数功能非常实用,但也有几个地方有点混淆,下面通过实际的例子来说明:
    比如我们现在要针对串
var src="<a href=&quot;http://xx.com/a/2010 ......

javascript trim方法

在javascript中的string对象没有trim方法,所以trim功能需要自己实现:
代码如下:
Java代码
﹤scriptlanguage=”javascript”﹥   
/**  
*删除左右两端的空格  
*/  
String.prototype.trim=function(){      
  &nbs ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号