
JS
文章平均质量分 51
battlehawk
这个作者很懒,什么都没留下…
展开
-
如何判断一组同名radio中是否有一个被选中
function chkform(){ var sltSource=false; for(var i=0;i if(document.lazyForm.vote[i].checked==true) sltSource=true; }原创 2009-03-26 16:55:00 · 3202 阅读 · 0 评论 -
js提交表单
function checkValue(){ var username = document.form.username.value; var password = document.form.password.value; if(username == ){ alert("用户名不能为空!");原创 2009-06-23 15:42:00 · 537 阅读 · 0 评论 -
在js中定义全局变量(IE,FireFox)
var X2={} //my namespace:)X2.Eval=function(code){ if(!!(window.attachEvent && !window.opera)){ //ie execScript(code); }else{ //not ie window.eval(code); }}转载 2009-09-07 16:03:00 · 6143 阅读 · 3 评论 -
Ajax带中文参数提交
环境:操作系统:windowsXP sp2JDK:1.5tomcat5.5页面UTF-8编码1.js的url中,使用encodeURI()对中文参数进行编码,java代码中使用new String(request.getParameter("variables").getBytes("iso-8859-1"),"UTF-8")获得参数即可解决中文乱码问题,但是这样处理的原创 2009-07-08 14:38:00 · 3426 阅读 · 1 评论 -
firefox中使用window.createPopup的问题
火狐中使用window.createPopup(),兼容ie的解决办法:if (!window.createPopup) { var __createPopup = function() { var SetElementStyles = function( element, styleDict ) { var style = element.style ; for (原创 2010-02-09 11:22:00 · 11014 阅读 · 3 评论 -
window.close()在firefox中的类似办法
前提:此页面是新打开页面例如:a页面代码firefox window.close()b页面代码如下function close(){ window.opener = null; window.open(,_self); window.close();}原创 2010-02-23 23:39:00 · 707 阅读 · 0 评论 -
IE7 iframe自适应高度
... <iframe id="left" style="WIDTH: 100%;" name="left" src="a.html" mce_src="a.html" frameborder="0" scrolling="yes"> <iframe name="right" id="right" style="w原创 2010-03-04 15:56:00 · 1364 阅读 · 0 评论