随笔分类 - javascript
摘要:function renderingTable(obj){ $(obj).each(function(){ //设置奇数行颜色 $(this).find("tr:even").css("background-color", '#e9f3fa'); //设置偶数行颜色 $(this).find...
阅读全文
摘要:针对chrome,firefox,IE Enter键跨浏览器提交jsp页面:<input id="edit-password" name="user.password" type="password" maxlength="60" required="required" value="${user.password}" onkeydown="return LoginApp.checkKeyDown(event)" class="form-t
阅读全文
摘要:1.下载AjaxFileUpload.js插件2.修改ajaxfileupload.js文件中的uploadHttpData方法(蓝色部分为修改内容): 原方法: uploadHttpData: function( r, type ) { var data = !type; data = type == "xml" || data ? r.responseXML : r.responseText; // If the type is "script", eval it in global context ...
阅读全文
摘要:判断checkBox是否被选择了:function checkAllCommand(){ var checkBox = document.getElementsByName("jqg_wfgrid1_1"); if($("#cb_wfgrid1").attr("checked")){ for(var i = 0; i < checkBox.length; i ++){ checkBox[i].checked = true; } }else{ for(var i = 0; i < checkBox.length; i ++)
阅读全文
摘要:在IE中出现中文乱码,但在chrome,firefox中正常.可能出现的问题:1.数据提交时使用了$.get()解决方案:使用$.post()方法提交
阅读全文
摘要:/** * 邮箱验证 * @param {Object} email * @return {TypeName} */ isEmail:function(email){ var regu = "^(([0-9a-zA-Z]+)|([0-9a-zA-Z]+[_.0-9a-zA-Z-]*))@([a-zA-Z0-9-]+[.])+([a-zA-Z]{2}|net|com|gov|mil|org|edu|int|name|asia)$"; return (email.search(new RegExp(regu)) == -1)?false:true; }, /** ...
阅读全文
摘要:login.jsp页面:<head> <script type="text/javascript" src="js/LoginApp.js"></script></head><body> <FORM name=form1 action="logining" method="post"> <INPUT style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px s
阅读全文