¹ØÓÚaspÖÐifÖ´ÐÐЧÂʵÄÎÊÌâ
Èç¹û¸ù¾ÝÒ»¸öÌõ¼þÀ´Ö´Ðв»Í¬µÄsqlÓï¾ä£¬È磺 if str="a" then sql="select xxx from [tab] where xxx" elseif str="b" then sql="select xxx from [tab] where xxx" elseif str="c" then sql="select xxx from [tab] where xxx" elseif str="d" then sql="select xxx from [tab] where xxx" ¡¡ end if Èç¹ûÕâÀïÃæÓкܶàµÄif elseif £¬ÔÚ²éѯ±È½ÏƵ·±µÄʱºò£¬ÈçºÜ¶à¿Í»§¶ËÔÚÏßͬʱ²éѯµÄʱºò£¬»áÑÏÖØÓ°ÏìÖ´ÐÐЧÂÊÂ𣿠Èç¹û²»ÓÃif£¬ÊÇ·ñÓкõĽâ¾ö·½·¨ÄØ£¿
ÓÃswitch case »¹ÓоÍÊÇifÌõ¼þ£¬Ê¹ÓÃÖÐÎÄ×Ö·ûµÄÌõ¼þ»á±ÈʹÓÃÓ¢ÎÄ»òÕßÊý×ÖµÄÀ´µÃÂýÂ𣿠±ÈÈç if str="Öйú" ÕâÑù£¬»¹ÊÇif str="CN"»òif str="086" ÕâÑù¿ì£¿»¹ÊDz¶à£¿ aspÖкÃÏñûÓÐswitch case£¿Ó¦¸ÃÊÇselect case°É£¿ select caseЧÂʱÈif elseif¸ßÂ𣿠Select Case½á¹¹Ö»¼ÆË㿪ʼ´¦µÄÒ»¸ö±í´ïʽ£¨Ö»¼ÆËãÒ»´Î£©£¬¶ø If...Then...ElseIf ½á¹¹¼ÆËãÿ¸ö ElseIf Óï¾äµÄ±í´ïʽ£¬ÕâЩ±í´ïʽ¿ÉÒÔ¸÷²»Ïàͬ¡£½öµ±Ã¿¸ö ElseIf Óï¾ä¼ÆËãµÄ±í´ïʽ¶¼Ïàͬʱ£¬²Å¿ÉÒÔʹÓà Select Case ½á¹¹´úÌæ If...Then...ElseIf ½á¹¹¡£ ¸öÈËÈÏΪÕâ¸öÔì³ÉµÄЧÂÊÎÊÌâ¿ÉÒÔºöÂÔ²»¼Æ¡£ÒýÓà Èç¹û¸ù¾ÝÒ»¸öÌõ¼þÀ´Ö´Ðв»Í¬µÄsqlÓï¾ä£¬È磺 if str="a" then sql="select xxx from [tab] where xxx" elseif str="b"
Ïà¹ØÎÊ´ð£º
<form id="form1" runat="server"> <div> <script type="text/javascript"> function oo(a){ document.getEleme ......
<%On Error Resume Next Set conn=Server.CreateObject("ADODB.Connection") conn.begintrans conn.Open ("Driver={SQL Server};server=(local);uid=sa;database=student;pwd=")
......
×î½üÎÒͨ¹ýѧϰ£¬¸Ð¾õ×Ô¼ºÑ§µÄ»¹¿ÉÒÔÁË£¬Ïë×öÒ»ÍøÕ¾£¬µ«ÊÇÒ»Ö±¶¼ÕÒ²»µ½Ìâ²Ä£¬²»ÖªµÀ×öʲô£¬Ï£Íû¸÷λ¸øÎÒµãÒâ¼û£¬Èç¹ûÓÐÐèÇóÎĵµ¾Í¸üºÃÁË£¡Ï£Íû´ó¼Ò¸øÎÒµãÒâ¼û£¬Ð»Ð»£¡ ÏÈ×ö¸öÆóÒµÍøÕ¾°É£¬ÎҸоõÒ»¸öÈË×öÍøÕ¾²»ÊÊÒË ......
½¨ÁËÒ»¸öÕ¾µã£¬ÀïÃæÓÐ login.aspx. events.aspx µÈµÈ ÆäËûµÄÒ³Ãæ¡£ µ«ÊÇÎÒµ÷ÊÔ ÆäËûÒ³ÃæµÄʱºò£¬±Ä³öÀ´µÄ×ÜÊÇ login.aspx Ò³Ãæ¡£ ¸Õѧasp ÇëÖ¸½Ì ÄãÉèÖÃÆðʼҳÁ˰ɡ£¡£ ¶÷ÔõôȡÏûÄØ£¿ Òªµ ......
<% Sql="select top 8 * from NewsData where d_classid in (select classid from NewsClass where ParentID=16)" Rs.Open Sql, conn, 1,1 Do Until Rs.Eof
......