JavaScript±íµ¥ÑéÖ¤´óÈ«£¨Èý£©
/*
JavaScript½Å±¾£¬ÑéÖ¤±íµ¥ÖеÄÊý¾ÝÏî begin
-------------------------------------------------------------------------------
*/
function checkForm(objFrm){
var len = 0;
len = objFrm.elements.length;
var i = 0;
var objCheck;
//Îı¾¿ò
for(i = 0; i < len; i ++){
objCheck = objFrm.elements[i];
if(objCheck.type =="text" && !f_checkTextValid(objCheck) ){
return false;
}
}
//ÏÂÀ¿ò
for(i = 0; i < len; i ++){
objCheck = objFrm.elements[i];
if(objCheck.type =="select-one" && !f_checkSelectValid(objCheck) ){
return false;
}
}
//ʱ¼ä¶ÎÓÐЧ
if( f_checkStartAndEndDate(objFrm) == false) return false;
return true;
}
function f_checkSelectValid(obj){
//alert("check select");
if(obj.options.length <= 0){
alert("ÏÂÀÑ¡¿òÎÞÊý¾Ý!");
return false;
}
return true;
}
function f_checkStartAndEndDate(frm){
var len = frm.elements.length;
if(len == null && len == 0) return true;
var i=0;
var temp;
var objCheck;
var objStartDate;
var objEndDate;
//alert("start date period check");
try{
for(i=0; i< len ; i++){
objCheck = frm.elements[i];
temp = objCheck.name;
if( temp.indexOf("startDate") >0 ||temp.indexOf("beginDate")>0 )
objStartDate = objCheck;
if( temp.indexOf("endDate") > 0 )
objEndDate = objCheck;
}
//alert(objStartDate.value);
//alert(objEndDate.value);
if(objStartDate.value==null || objStartDate.value =="" || objStartDate.value ==null || objStartDate.value ==""){
return true;
}
return checkTwoDate(objStartDate.value, objEndDate.value);
//alert("end date period check");
}catch(E){}
return true;
}
function f_checkTextValid(obj){
//²»ÄÜΪ¿Õ
if(obj.getAttribute("isNeed") != null){
if(f_isNotNull(obj) == false) return false;
}
//²»Äܳ¬¹ý³¤¶È
if(obj.getAttribute("maxlength") != null){
if(f_checkLength(obj) == false) return false;
}
var checkType ="";
checkType = obj.getAttribute("checkType");
if(checkTyp
Ïà¹ØÎĵµ£º
´óÒ»µãµÄ¿ò¼Ü¶¼ÓÐÕâ¸ö¶«Î÷¡£PrototypeÔÀ´µÄ¼Ì³Ð»úÖƷdz£Èõ£¬ÎªÁËÓëmootools¶Ô¿¹Ò²Ç¿»¯ÁËÕâÒ»·½Ãæ¡£ÂҪÓÃÔÐͼ̳ÐÀ´Ä£·ÂÀà¼Ì³Ð£¬¶¼»ù±¾´æÔÚÒ»¸ö¿Ë¡º¯Êý¡£°Ñ¸¸ÀàµÄÔÐÍÊôÐÔ¸´ÖƵ½×ÓÀàÉÏÈ¥¡£ÀíÄîµÄ¶«Î÷ÔÝʱÕâô¶à£¬¶¯ÊÖʵ¼ùÒ»ÏÂ×îʵ¼Ê¡£ÎÒÃÇÉè¼ÆÒ»¸öÊý×éÀ࣬ӵÓÐÔÉúÊý×éµÄÄÜÁ¦ÓëÐÂÀ©Õ¹µÄÄÜÁ¦¡£
var isNumber ......
ÎÒÃÇÀ´Ä£·ÂÒ»ÏÂ×îOOµÄmootoolsµÄ¼Ì³Ð»úÖÆ¡£ËüµÄÀ඼ÓÐÒ»¸ö½Ð×öinitialize¹¹Ôì·½·¨£¬ÕâÓëJavaµÄÀ඼ÓÐÒ»¸öÓëÀàÃûͬÃûµÄ¹¹Ôì·½·¨Ò»ÑùµÄµÀÀí¡£Ö»²»¹ý£¬ÕâЩ½Ðinitialize»òinit¶¼Êǽè¼ø×ÔPrototype£¬¶øPrototypeÄÇ°ïÈËÊÇRuby³öÉí¡£ÎªÁËÇø±ðmootoolsÄÇÖÖÎÛȾÔÉú·½·¨µÄ×ö·¨£¬ÎÒ°ÑÀàµÄ¹¹ÔìÆ÷ÃüÃûΪvariant£¬²¢ÇÒ½ûÖ¹²é¿´¹¹Ô ......
ÔÚrubyÖÐÎÒÃÇ¿ÉÒÔͨ¹ý"*"²Ù×÷·ûÈ¥×Ö·û´®½øÐб¶Ôö£¬Èç"ruby"*2Ôò·µ»Ø"rubyruby"¡£ÔÚjavascriptÖУ¬×Ö·û´®Ö»ÄÜÓüӺţ¬Â³Ë·¨Ò²¼Ó·¨Ñݱä¹ýÀ´µÄ¡£ÎÒÃÇ¿ÉÒÔ¸ãÒ»¸öÊÔÊÔ¡£
·½·¨Ò»
String.prototype.times = function(n) {//IE6 530-640 FF3 400~550 IE8 840 ~1110 chrome 600~1000
&nb ......
Ò»¡£eclipse ÅäÖÃspket
spketÊÇÒ»¸öдJSµÄ²å¼þ
ÎÒµÄÅäÖû·¾³ÊÇ
eclipse3.2
spket-1.6.11.jar
1.°²×°spket-1.6.11.jar,
°Ñspket°ü¿½±´µ½Ò»¸öÄãÄܼǵÄסµÄĿ¼ÏÂ,ÎÒÕâ·ÅÔÚe:¸ùĿ¼ÏÂ
½Ó׎øÈëDOSÏÂ,½øÈëd:¸ùĿ¼,ÊäÈëJAVA -jar spket-1.6.11.jarÃüÁî
Ö®ºó»áÌáʾÄã°²×°spket,°´×ÅËûÌáʾµÄÒ»Ö±ÏÂÒ»²½,Öмä»áÌáÊ¾Ä ......
1. oncontextmenu="window.event.returnValue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)> <td>no </table> ¿ÉÓÃÓÚTable
2. <body onselectstart="return false"> È¡ÏûÑ¡È¡¡¢·ÀÖ¹¸´ÖÆ
3. onpaste="return false" ²»×¼Õ³Ìù
4. oncopy="return false;" oncut="re ......