随笔分类 -  JavaScript

摘要:javascript控制text只能输入数字<script type="text/javascript">function numbersonly(myfield, e, dec) { var key; var keychar; if (window.event) key = window.event.keyCode; else if (e) key = e.which; else r... 阅读全文

posted @ 2006-10-31 07:44 Alter-it 阅读(711) 评论(1) 推荐(0)

摘要:1. 将彻底屏蔽鼠标右键 oncontextmenu="window.event.returnValue=false"<table border oncontextmenu=return(false)> <td> no</table> 可用于Table 2.取消选取、防止复制 <body onselectstart="return false"> 3... 阅读全文

posted @ 2006-05-23 22:01 Alter-it 阅读(2686) 评论(3) 推荐(0)

摘要:还没有具体上网查一些资料,这个ajax到底是什么东西,不过从感受来看,这个东西是用来增强web程序的交互能力的,让客户使用web程序的时候更贴近在使用c/s结构的程序一样,其中感觉最为明显的要算是页面的无刷新了,这一点非常诱人,因为这曾经是很难解决的问题(或许是我们没有找到正确的方法)。AJAX的方法早就有了,只是没有得到如今这般的关注罢了,使用AJAX能加强用户的体验,使得用户使用起web程序来... 阅读全文

posted @ 2006-03-16 00:16 Alter-it 阅读(559) 评论(0) 推荐(0)

摘要:window.opener.location.reload(true); //true代表从服务器重新获取,false为从缓存中获取,默认为false或window.opener.location.href = window.opener.location.href;或window.operner.location.replace(location); 阅读全文

posted @ 2006-03-01 11:46 Alter-it 阅读(3230) 评论(1) 推荐(0)