javascript¼òµ¥ÑéÖ¤
<html>
<head>
<base href="<%=basePath%>">
<script type="text/javascript">
function check(){
var name1 = document.form1.name1.value;
var password1 = document.form1.password1.value;
var email = document.form1.email.value;
if(name1 == ""){
alert("Óû§Ãû²»ÄÜΪ¿Õ!");
return false;
}
else if(password1.length<4 || password1==""){
alert("ÃÜÂë²»ÄÜÉÙÓÚ4λ");
return false;
}else {
var idxEmail = email.indexOf('@');
if(idxEmail <=0 || idxEmail == email.length - 1){
alert("EmailµØÖ·¸ñʽ²»ºÏ·¨");
return false;
}
}
}
</script>
</head>
<body>
<form action="registerOK.jsp" method="post" name="form1" onsubmit="return check()">
<input type="text" name="name1"/>
<input type="password" name="password1"/>
<input type="text" name="email" />
<input type="submit" value="Ìá½»">
</form>
</body>
</html>
Ïà¹ØÎĵµ£º
// ÏÂÃæ´úÂë¿éʵÏÖÁËstring.parseJSON·½·¨
(function(s){
// This prototype has been released into the Public Domain, 2007-03-20
// Original Authorship: Douglas Crockford
// Originating Website: http://www.JSON.org
// Originating URL : http://www.JSON.o ......
40¸öÇáÁ¿¼¶JavaScript¿â½éÉÜ
Á÷ÐÐ JavaScript ¿â²»Ê¤Ã¶¾ÙjQuery, MooTools, Prototype, Dojo, YUIÕâЩ JavaScript ¿â¹¦Äܷḻ¼ÓÉÏËüÃDzå¼þ¼¸ºõÄÜʤÈÎÈκι¤×÷È»¶øÕâÓдú¼ÛÕâЩ¿âÍùÍùµ¼ÖÂÄãÍøÒ³³ß´çÓ·Ö×ijЩ³¡ºÏÈç¹ûÄãÖ»ÏëÍê³ÉÌØ¶¨¹¤×÷¿ÉʹÓÃһЩ¹¦ÄܸüרһÇáÁ¿¿â±¾ÎĽéÉÜÁË40¸ö·Ç³£³öÉ«ÇáÁ¿¼¶ JavaScript ¿â
......
<!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title> JavaScript: xm ......
//ת»»ÎªUNIXʱ¼ä´Á
function strtotimestamp(datestr)
{
var new_str = datestr.replace(/:/g,"-");
new_str = new_str.replace(/ /g,"-");
var arr = new_str.split("-");
var datum = new Date(Date. ......
javascriptÄÚ´æÐ¹Â¶µÄÎÊÌâÒ»Ö±ÒÔÀ´¶¼²»Êܵ½´ó¼ÒµÄÖØÊÓ£¬ÔÒòÊǶÔÓû§µÄÓ°ÏìûÓÐ̫ʵ¼ÊµÄ±íÏÖ£¬»òÐí½ü¼¸ÄêÄڴ淢չѸËÙ¡£½Å±¾ÄÚ´æÔÙй¶Ҳ²»»áÓÐÌ«´óÓ°Ïì¡£
µ±È»×÷Ϊǰ¶Ë¿ª·¢µÄͬѧÃÇ£¬¾Í²»ÄÜÓÐÕâÑùµÄ½ÄÐÒÐÄÀí¡£³öÏÖmemory leaksºÜ´ó³Ì¶ÈÉÏÊÇÒòΪ³ÌÐòµÄ²»³ÉÊìºÍ±àÂ벻̫¹æ·¶Ôì³ÉµÄ¡£²»¹ý£¬ÕâÀï¾Í²»ËµÈçºÎ³öÏÖÎÊÌâµÄ£¬¶ÔÎÊÌ ......