`
___loveOfForever
  • 浏览: 78054 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论
文章列表
function ValidateUsr(){    var j = 0;   for(var i=0;i<document.infoForm.privilegeid.length;i++){   if(document.infoForm.privilegeid[i].checked){       j++;   }   }   if(j<2){     alert("至少选择2个功能!");     return false;   } return true; } infoForm为表单的名字,多选框的name为priviligeid ...
<servlet>   <servlet-name>dwr-invoker</servlet-name>   <servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class> <init-param> <param-name>debug</param-name> <param-value>true</param-value> </init-param> </servlet> <s ...
function ValidateUsr(){    var j = 0;   for(var i=0;i<document.infoForm.privilegeid.length;i++){   if(document.infoForm.privilegeid[i].checked){       j++;   }   }   if(j<2){     alert("至少选择2个功能!");     return false;   } return true; } infoForm为表单的名字,多选框的name为priviligeid ...
<script language="JavaScript" type="text/JavaScript"> function checkPass(pass){ if(pass.length < 6){       return 0;   } var ls = 0; if(pass.match(/([a-z])+/)){       ls++;   }   if(pass.match(/([0-9])+/)){       ls++;     }   if(pass.match(/([A-Z])+/)){      ...
<SCRIPT LANGUAGE="JavaScript"> function detectOS(){      var sUserAgent = navigator.userAgent;     var isWin = (navigator.platform == "Win32") || (navigator.platform == "Windows");                                                                            var i ...
<SCRIPT LANGUAGE="JavaScript"> function detectOS(){      var sUserAgent = navigator.userAgent;     var isWin = (navigator.platform == "Win32") || (navigator.platform == "Windows");                                                                            var is ...
<SCRIPT LANGUAGE="JavaScript">   <!-- function detectOS(){      var sUserAgent = navigator.userAgent;     var isWin = (navigator.platform == "Win32") || (navigator.platform == "Windows");                                                                        ...
<script language="JavaScript" type="text/JavaScript"> function checkPass(pass){ if(pass.length < 6){       return 0;   } var ls = 0; if(pass.match(/([a-z])+/)){       ls++;   }   if(pass.match(/([0-9])+/)){       ls++;     }   if(pass.match(/([A-Z])+/)) ...
function ValidateUsr(){    var j = 0;   for(var i=0;i<document.infoForm.privilegeid.length;i++){   if(document.infoForm.privilegeid[i].checked){       j++;   }   }   if(j<2){     alert("至少选择2个功能!");     return false;   } return true; } infoForm为表单的名字,多选框的name为privilige ...
第一个list为所有的多选框的值, 第二个lists为默认选中的值。 <%    for(int i = 0 ;i <list.size();i++){       DeptnoForm df = (DeptnoForm)list.get(i);     %>       <input <%       for(int j = 0 ;j <lists.size();j++){       AreaForm a = new AreaForm();       a=(AreaForm)lists.get(j);       if(a.ge ...
<script type="text/javascript">     function block(oEvent){       if(window.event)       oEvent=window.event;      if(oEvent.button==2)      alert("鼠标右键不可用!");     }     document.onmousedown=block; </script> 在页面添加把这段代码复制上去即可禁止右键的使用。
<html:text onkeydown="if(event.keyCode==13){event.keyCode=0;return false}" property="areaname" title="请输入区域名称!"/> 只需在文本框加入:onkeydown="if(event.keyCode==13)event.keyCode=0;return false}"即可。 当然也可以用js校验,但是此法比较简单方便,适合简单的页面开发使用。
超简洁: 程序员必看哦。 String 新字符串 = new String(旧字符串.getBytes("ISO_8859_1"),"UTF-8");
<%@ page contentType="image/jpeg" import="java.awt.*,java.awt.image.*,java.util.*,javax.imageio.*,java.io.*"%> <%!Color getRandColor(int fc, int bc) {//给定范围获得随机颜色 Random random = new Random(); if (fc > 255) fc = 255; if (bc > 255) bc = 255; int r = fc ...
1.struts1.2+hibernate3.1+spring2.0整合的时候如果在注入的时候变量命名不规范如sCarSell,则spring会报错: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'sCarSell' of bean class [com.kingtoon.count.struts.action.CountAction]: Bean property 'sCarSell' is ...
Global site tag (gtag.js) - Google Analytics