javascriptÖеıհüÑ»·±äÁ¿Ö»ÄÜÈ¡×îºóÒ»¸öÖµÎÊÌâ
ÍøÉÏÃæËµjavascript±Õ°üÓÐÁ½µãÐèҪעÒ⣺
1. ±Õ°üÖеĻ·¾³±äÁ¿Èç¹ûÊÇÔÚÑ»·ÖУ¬ÄÇôʹÓñհü±äÁ¿µÄʱºòÊÇÑ»·½áÊøºóµÄÖµ
2. ±Õ°ü»·¾³±äÁ¿¿ÉÒÔ¶¨ÒåÔÚ·½·¨ºó£¬²»Ó°ÏìʹÓÃ
µÚ1µãÊÇ˵±Õ°üÀï»·¾³±äÁ¿Èç¹ûÊÇÔÚÑ»·ÖУ¬ÄÇÖ»ÄÜȡѻ·½áÊøºóµÄÖµ
Õâ¸öÎÊÌâ¿ÉÒÔÓÃevalº¯Êý¼òµ¥½â¾ö£¬ÔÚÑ»·ÖÐÓÃevalÖ´Ðбհüº¯ÊýÓï¾ä¾ÍûÎÊÌâÀ²£¬Ð§ÂÊ·½Ãæ¿´´ó¼ÒʹÓÃÇé¾°°É£¬Ð¡·¶Î§Ó¦¸ÃÊÇûÎÊÌâµÄ
Ïà¹ØÎĵµ£º
<!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>
<title>¼ä¸ô¹ö¶¯Í¼Æ¬</title>
<meta http-equiv= ......
ÀûÓÃ Page.RegisterStartupScript("", "<script language='javascript'> results();</script>");
»òÕßÊÇ Page.RegisterClient ......
ÕýÔò
<script>
function checkvalue(){
if(document.Form.content.value.replace(/\s/g,"")=="")
{
alert("ÄÚÈݲ»ÄÜΪ¿Õ!");
document.addForm.content.focus();
return false;
}
document.addForm.submit();
return ......
ÔÚÐÂÔöÊý¾ÝÏîµÄʱºò£¬ÓÃajaxʵÏÖÎÞË¢ÐÂÌá½»£¬µ«ÉÏ´«ÎļþµÄʱºò£¬ÓÉÓÚÊý¾ÝÀàÐÍÔÒò£¬²»Äܽ«Ò³ÃæµÄ<asp:FileUpload>ÖÐÒÔ×Ö·û´®ÖµµÄ·½Ê½´«µ½jsÀïµ÷Óá£ÎÒÒ»¹²ÕÒµ½ÁËÁ½¸ö·½·¨ÓèÒÔ½â¾ö£¬ÊµÏÖÎÞË¢ÐÂÉÏ´«¡£
µÚÒ»ÖÖ·½·¨£ºÀûÓÃjsµÄADODB.Stream£¬½«ÎļþÏÈת»»³ÉÁ÷£¬ÔÙͨ¹ýjsÉÏ´«µ½·þÎñÆ÷£¬ÕâÑùÓиöºÃ´¦¾ÍÊÇ¿ÉÒÔÉÏ´«³¬´óÎļþ£ ......
document Îĵ²¶ÔÏó - JavaScript½Å±¾ÓïÑÔÃèÊö
---------------------------------------------------------------------
×¢:Ò³ÃæÉÏÔªËØnameÊôÐÔºÍJavaScriptÒýÓõÄÃû³Æ±ØÐëÒ»Ö°üÀ¨´óСд
·ñÔò»áÌáʾÄãÒ»¸ö´íÎóÐÅÏ¢ "ÒýÓõÄÔªËØÎª¿Õ»òÕß²»ÊǶÔÏó"
------------------------------------------------------ ......