aspÊý×éÅÅÐòµÄÎÊÌâ
±íµ¥:
HTML code:
<form action="1.asp" method="post">
<input name="a1" value="11" type="text" />
<input name="a2" value="22" type="text" />
<input name="a3" value="33" type="text" />
</form>
1.asp
VBScript code:
Dim a()
ReDim a(n)
for i =1 to n
a(i)=replace(trim(request.form("a"&i)),"'","")
Next
Q:
±íµ¥ÖеÄÏîÄ¿·ÖΪÐÂÔöºÍɾ³ýÁ½ÖÖÇé¿ö
1.ÐÂÔö
Èç¹ûÊǰ´ÕÕĬÈϵÄa1£¬a2,a3µÄÕý³£Ë³ÐòÅÅÁУ¬¿ÉÒÔÕý³£½ÓÊÕ±íµ¥Ìá½»µÄÖµ²¢±£´æ¡£
µ«ÊÇÈç¹ûÔÚa1ºÍa2Ö®¼äÔÙÐÂÔöÁËÒ»¸öa4£¬ Ò²¾ÍÊÇÇ°Ì¨Ò³Ãæ¿´µ½µÄÅÅÐòΪ£ºa1,a4,a2,a3£¬ÓÃÒÔÉÏ´úÂë½ÓÊÕ±£´æºó£¬ÒÀÈ»ÅųÉÁËa1,a2,a3,a4ÁË£¬ÄÜ·ñ²»ÒªÕâôÅÅÁÐÄØ£¿¶øÊǰ´ÕÕÇ°Ì¨Ò³ÃæÊµ¼ÊµÄa1,a4,a2,a3À´ÅÅÁУ¿
2.ɾ³ý
a1-a3Ö®¼äɾ³ýÁËa2£¬ÔÚ½ÓÊÕ±íµ¥µÄʱºò£¬ÓÃÒÔÉÏ´úÂë³ö´íÁË£¬ÒòΪÊý×éȱÉÙÁËa2,ÄÜ·ñÖ±½ÓºöÂÔ±»É¾³ýµÄa2,Ö±½Ó½ÓÊÕa1,a3ÄØ£¿
ÒÔÉÏ£¬Ò²¾ÍÊÇ£ºÈçºÎ°´ÕÕʵ¼ÊÇ°Ì¨Ò³ÃæÔ¤ÀÀ¿´µ½µÄÅÅÐòÀ´±£´æÄØ£¿Ò²¾ÍÊÇÎÞÂÛa1-a4ÔõôÅÅÁУ¬ÎÞÂÛÐÂÔö¡¢É¾³ý£¬°´ÕÕ¡°Ëù¼û¼´ËùµÃ¡±µÄ·½Ê½ÓÃÊý×é½ÓÊܲ¢±£´æ±íµ
Ïà¹ØÎÊ´ð£º
conn.asp
<%
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source="&server.MapPath("Connt ......
<%On Error Resume Next
Set conn=Server.CreateObject("ADODB.Connection")
conn.begintrans
conn.Open ("Driver={SQL Server};server=(local);uid=sa;database=student;pwd=")
......
ÎÒ°ïѧУ×öÁËÒ»¸öÕ¾£®
ÔÚÐ£Ô°ÍøµÄÇé¿öÏ£¬Äܹ»µÇ½³É¹¦£¬ºǫ́ÕʺŶ¼ÄÜͨ¹ý£¬½øÈëºǫ́
µ«ÊÇÔÚÍâÍø£Á£ÄµÄÇé¿öÏ£¬Äܹ»µÇ½ºǫ́µÄÒ³Ãæ£¬Ò³ÃæÊÇ£Á£Ó£ÐÎļþ£®
µ«ÊÇÊäÈëÕʺźÍÃÜÂëµÄʱºò£¬ÍøÒ³ÔËÐкܾö¼ ......
Çë¸÷λ¸ßÊÖ°ï½â¾ö,¼±!!!
<script language="JavaScript" type="text/javascript">
function CheckInput(){
if (document.frm.loginname.length =0){
alert('ÇëÕý ......
ÎÒÏëÓÃaspд¸öÒ³ÃæÒÔǰûÓнӴ¥¹ý£¬ÎÒ¿´ÍøÉÏ˵aspµÄÔËÐл·¾³Ö»ÄÜÊÇwindows£¬»¹±ØÐëҪװIIS¡£
Çë½Ì¸÷λ¸ßÊÖ£¬asp»¹ÓÐÆäËûµÄÔËÐл·¾³Âð?
²î²»¶à¾ÍÕâЩÁË£¬¾ÍÊÇIISÒ»¶¨Òª×°ºÃ
»¹ÓÐÒªÊÇÓÃVS2005µÄ»°ºÃÏñ¿ÉÒÔÖ±½ÓÔ ......