HTML: <!--#include file="xshlconfig.asp"--> <link href="xshl5_css/xshl5_css.css" rel="stylesheet" rev="stylesheet" type="text/css" media="all" /> </head> <% xshl5_sotype=request.form("xshl5_sotype") if instr(xshl5_sotype,"'")<>0 or instr(xshl5_sotype,"=")<>0 or instr(xshl5_sotype,"select")<>0 then response.redirect "xshl5_error.asp" xshl5_sokey=request.form("xshl5_sokey") '获取搜索关键字 if instr(xshl5_sokey,"'")<>0 or instr(xshl5_sokey,"=")<>0 or instr(xshl5_sokey,"select")<>0 then response.redirect "xshl5_error.asp" xshlmoe_tb=request.querystring("xshl5_moetype") if instr(xshlmoe_tb,"'")<>0 or instr(xshlmoe_tb,"=")<>0 or instr(xshlmoe_tb,"select")<>0 then response.redirect "xshl5_error.asp" if xshlmoe_tb="" and xshl5_sotype="" and xshl5_sokey="" then selectsql="select * from xshl5_moeob order by xshl5_id desc" elseif xshl5_sotype<>"" and xshl5_sokey<>"" then selectsql="select * from xshl5_moeob where "+xshl5_sotype+" like '%"+xshl5_sokey+"%'" elseif xshlmoe_tb<>"" then selectsql="select * from "+xshlmoe_tb+" order by xshl_movid desc" else response.redirect "index.asp" end if set rs=server.createobject("adodb.recordset") rs.open selectsql,xshlconn,1,1 if rs.eof then response.write "<center><a href=index.asp>抱歉没有找到任何记录,请浏览其它项目!</a></center>" if xshlmoe_tb="" and xshl5_sotype="" and xshl5_sokey="" then response.end response.write "<meta http-equiv='refresh' content='1;url=index.asp'>" response.end end if rs.pagesize=index_tonum pagesize=rs.pagesize pagecount=rs.pagecount if not isnumeric(request.querystring("xshl_page")) and request.querystring("xshl_page")<>"" then response.redirect "xshl5_error.asp" if request.querystring("xshl_page")="" then page=1 else page=int(request.querystring("xshl_page")) end if if page<=0 then page=1 if page>pagecount then page=pagecount rs.absolutepage=page %> <body> <div id="xshl_main"> <div id="xshl_header"> <div id="xshl_header_main"> <ul><li> <img alt="Xs5moe Version 1.05" src="xshl5_css/header1.jpg" /></li><li class="rightli"><br /><br /><br /><br />| <a title="home" href="index.asp">首页</a> | <a title="All Movies" href="xshl5_allmov.asp">全部电影</a> | <a title="Contact Us" href="mailto:[email protected]">联系我们</a> </li></ul> </div> </div> <div id="xshl_body"> <div id="xshl_body_left"> <div id="xshl_body_left_login"> <ul><%if session("isxshl5vip")="" then%><form name="vip_userform" method="post" action="check_vipuser.asp"> <li class="bgcolor">用户登陆</li><li>账号: <input class="myinput1" type="text" name="xshl5_name" value="guest" size="10" /> 密码: <input class="myinput1" type="password" name="xshl5_pass" value="guest" size="10" /></li><li class="myinput"> <input class="myinput2" type="submit" name="submit" onclick="if(document.vip_userform.xshl5_name.value.length==0||document.vip_userform.xshl5_pass.value.length==0){javascript:alert('用户名或密码不能为空!');return false;}" value="确定" /> <input class="myinput2" type="reset" name="reset" value="重置" /> </li></form> <%else:response.write "<li class='bgcolor'>用户登陆</li><li>今天是 "&year(date)&"年"&month(date)&"月"&day(date)&"日<br /> 欢迎您:"%><%if instr(session("isxshl5vip"),"xshl_vip")<>0 then%><%=replace(session("isxshl5vip"),"xshl_vip","")&" 会员 "%><%else response.write "Guest 游客 ":end if%><a href=logout.asp>退出</a></li><%end if%> </ul> </div> <div id="xshl_body_left_notice"> <ul><li class="bgcolor">本站公告</li><li class="mytext"><marquee height="140" direction="up" scrollamount="2" onmouseover="this.stop()" onmouseout="this.start()"> 本站公告:<%=index_notice%>…</marquee></li></ul> </div> <div id="xshl_body_left_moetype"> <ul><li class="bgcolor">影片类型</li> <% xshl5_selectsql="select * from xshlmoetb order by xshl_moetbid asc" set xshl5_rs=server.createobject("adodb.recordset") xshl5_rs.open xshl5_selectsql,xshlconn,1,1 do while not xshl5_rs.eof %> <li class="moetype"><%if not xshl5_rs.eof then%> <a title="<%=xshl5_rs("xshl_moeobname")%>" href="index.asp?xshl5_moetype=<%=xshl5_rs("xshl_tbname")%>"><%=xshl5_rs("xshl_moeobname")%></a><%xshl5_rs.movenext%><%end if%> <%if not xshl5_rs.eof then%><a title="<%=xshl5_rs("xshl_moeobname")%>" href="index.asp?xshl5_moetype=<%=xshl5_rs("xshl_tbname")%>"><%=xshl5_rs("xshl_moeobname")%></a><%xshl5_rs.movenext%><%end if%> <%if not xshl5_rs.eof then%><a title="<%=xshl5_rs("xshl_moeobname")%>" href="index.asp?xshl5_moetype=<%=xshl5_rs("xshl_tbname")%>"><%=xshl5_rs("xshl_moeobname")%></a><%xshl5_rs.movenext%><%end if%></li> <% loop xshl5_rs.close set xshl5_rs=nothing %> </ul> </div> <div id="xshl_body_left_moepaihang"> <ul> <li class="bgcolor">影片排行榜</li> <% xshl5_soselectsql="select top 15 xshl5moe_tb,xshl5_title,xshl_num,xshl5_date from xshl5_moeob order by xshl_num desc" set so_rs=server.createobject("adodb.recordset") so_rs.open xshl5_soselectsql,xshlconn,1,1 %> <li class="lipaihang1">排名</li><li class="lipaihang2">电影片名</li><li class="lipaihang3">人气</li> <%for i=1 to 15:if so_rs.eof then:exit for:end if%> <li class="lipaihang1"><%=i%></li><li class="lipaihang2"><%if session("isxshl5vip")="" then%><a title="<%=so_rs("xshl5_title")%>" href="javascript:alert('请先登陆本系统!')"><%else%><a title="<%=so_rs("xshl5_title")%>" href="xshl5_list.asp?moeob_type=<%=so_rs("xshl5moe_tb")%>&xshl5_date=<%=so_rs("xshl5_date")%>" target="_blank"><%end if%><%=so_rs("xshl5_title")%></a></li><li class="lipaihang3"><%=so_rs("xshl_num")%></li><%so_rs.movenext:next%> </ul> </div> <div id="xshl_body_left_sou"> <ul><form name="xshlsoform" method="post" action="index.asp"> <li><input type="radio" name="xshl5_sotype" value="xshl5_title" checked>片名 <input type="radio" name="xshl5_sotype" value="mov_actor">演员 <input type="radio" name="xshl5_sotype" value="mov_director">导演</li><li class="myinput1"><input type="text" name="xshl5_sokey" size="25" maxlength="50"></li><li><input class="myinput2" type="submit" onclick="if(document.xshlsoform.xshl5_sokey.value.length==0){javascript:alert('请输入搜索关键字!');return false;}" value="搜索"> <input class="myinput2" type="reset" value="重置"></li></form> </ul> </div> </div> <div id="xshl_body_main"> <div id="xshl_body_main_top"> <ul><li class="bgcolor"> 推荐电影:</li><li> </li> <% gmoeselectsql="select top 10 xshl5moe_tb,xshl5_date,xshl5_title,mov_director,mov_actor,mov_date from xshl5_moeob where xshl_goodmoe='1' order by xshl5_id desc" set gmoe_rs=server.createobject("adodb.recordset") gmoe_rs.open gmoeselectsql,xshlconn,1,1 for i=1 to index_goodmoenum if gmoe_rs.eof then exit for end if %> <li class="myli1"> ⊙ 片名: <a title="<%=gmoe_rs("xshl5_title")%>" <%if session("isxshl5vip")="" then%>href="javascript:alert('请先登陆本系统!')"<%else%>href="xshl5_list.asp?moeob_type=<%=gmoe_rs("xshl5moe_tb")%>&xshl5_date=<%=gmoe_rs("xshl5_date")%>" target="_blank"<%end if%>><%=left(gmoe_rs("xshl5_title"),6)%></a></li><li class="myli2">导演: <%if gmoe_rs("mov_director")="" then response.write "未知":else response.write left(gmoe_rs("mov_director"),5):end if%></li> <li class="myli3">主演: <% if gmoe_rs("mov_actor")="" then response.write "未知" elseif len(gmoe_rs("mov_actor"))>=11 then response.write left(gmoe_rs("mov_actor"),11)&"…" else response.write gmoe_rs("mov_actor") end if%></li> <li class="myli4">添加日期: <%=gmoe_rs("mov_date")%></li> <% gmoe_rs.movenext next gmoe_rs.close set gmoe_rs=nothing %> <li class="myli5"> </li> </ul> </div> <div id="xshl_body_main_middle"> <ul><li class="bgcolor"> 最新电影:</li></ul> <% for i=1 to index_tonum\4 if rs.eof then exit for end if %> <ul> <%if not rs.eof then%><li class="myallmoe"><img alt="<%if xshlmoe_tb="" then response.write rs("xshl5_title"):else response.write rs("mov_title"):end if%>" width="<%=index_imawid%>" height="<%=index_imaheg%>" src="<%if xshlmoe_tb="" then response.write rs("xshl5_image"):else response.write rs("mov_image"):end if%>"><br><%if session("isxshl5vip")="" then%><a title="<%if xshlmoe_tb="" then response.write rs("xshl5_title"):else response.write rs("mov_title"):end if%>" href="javascript:alert('请先登陆本系统!')"><%else%><a href="xshl5_list.asp?moeob_type=<%if xshlmoe_tb="" then response.write rs("xshl5moe_tb"):else response.write xshlmoe_tb:end if%>&xshl5_date=<%=rs("xshl5_date")%>" target="_blank"><%end if%><%if xshlmoe_tb="" then response.write rs("xshl5_title"):else response.write rs("mov_title"):end if%></a></li><%rs.movenext%><%end if%> <%if not rs.eof then%><li class="myallmoe"><img alt="<%if xshlmoe_tb="" then response.write rs("xshl5_title"):else response.write rs("mov_title"):end if%>" width="<%=index_imawid%>" height="<%=index_imaheg%>" src="<%if xshlmoe_tb="" then response.write rs("xshl5_image"):else response.write rs("mov_image"):end if%>"><br><%if session("isxshl5vip")="" then%><a title="<%if xshlmoe_tb="" then response.write rs("xshl5_title"):else response.write rs("mov_title"):end if%>" href="javascript:alert('请先登陆本系统!')"><%else%><a href="xshl5_list.asp?moeob_type=<%if xshlmoe_tb="" then response.write rs("xshl5moe_tb"):else response.write xshlmoe_tb:end if%>&xshl5_date=<%=rs("xshl5_date")%>" target="_blank"><%end if%><%if xshlmoe_tb="" then response.write rs("xshl5_title"):else response.write rs("mov_title"):end if%></a></li><%rs.movenext%><%end if%> <%if not rs.eof then%><li class="myallmoe"><img alt="<%if xshlmoe_tb="" then response.write rs("xshl5_title"):else response.write rs("mov_title"):end if%>" width="<%=index_imawid%>" height="<%=index_imaheg%>" src="<%if xshlmoe_tb="" then response.write rs("xshl5_image"):else response.write rs("mov_image"):end if%>"><br><%if session("isxshl5vip")="" then%><a title="<%if xshlmoe_tb="" then response.write rs("xshl5_title"):else response.write rs("mov_title"):end if%>" href="javascript:alert('请先登陆本系统!')"><%else%><a href="xshl5_list.asp?moeob_type=<%if xshlmoe_tb="" then response.write rs("xshl5moe_tb"):else response.write xshlmoe_tb:end if%>&xshl5_date=<%=rs("xshl5_date")%>" target="_blank"><%end if%><%if xshlmoe_tb="" then response.write rs("xshl5_title"):else response.write rs("mov_title"):end if%></a></li><%rs.movenext%><%end if%> <%if not rs.eof then%><li class="myallmoe"><img alt="<%if xshlmoe_tb="" then response.write rs("xshl5_title"):else response.write rs("mov_title"):end if%>" width="<%=index_imawid%>" height="<%=index_imaheg%>" src="<%if xshlmoe_tb="" then response.write rs("xshl5_image"):else response.write rs("mov_image"):end if%>"><br><%if session("isxshl5vip")="" then%><a title="<%if xshlmoe_tb="" then response.write rs("xshl5_title"):else response.write rs("mov_title"):end if%>" href="javascript:alert('请先登陆本系统!')"><%else%><a href="xshl5_list.asp?moeob_type=<%if xshlmoe_tb="" then response.write rs("xshl5moe_tb"):else response.write xshlmoe_tb:end if%>&xshl5_date=<%=rs("xshl5_date")%>" target="_blank"><%end if%><%if xshlmoe_tb="" then response.write rs("xshl5_title"):else response.write rs("mov_title"):end if%></a></li><%rs.movenext%><%end if%> </ul> <% next %> <ul> <li class="mybottom"> <%response.write "第"&page&"页 "%> <%if page>1 then%><a title="上一页" href="index.asp?<%if xshlmoe_tb<>"" then%>xshl5_moetype=<%=xshlmoe_tb%>&<%end if%>xshl_page=<%=(page-1)%>"><%end if%><<</a> <%mypagecount=pagecount:if mypagecount>=10 then mypagecount=10%> <%for i=1 to mypagecount%> <a title=<%response.write "第"&i&"页"%> href="index.asp?<%if xshlmoe_tb<>"" then%>xshl5_moetype=<%=xshlmoe_tb%>&<%end if%>xshl_page=<%=i%>"><%=i%></a> <%next%> <%if page<pagecount then%><a title="下一页" href="index.asp?<%if xshlmoe_tb<>"" then%>xshl5_moetype=<%=xshlmoe_tb%>&<%end if%>xshl_page=<%=page+1%>"><%end if%>>></a> <%response.write "共"&pagecount&"页 "%> | <a title="首页" href="index.asp?<%if xshlmoe_tb<>"" then%>xshl5_moetype=<%=xshlmoe_tb%>&<%end if%>xshl_page=1">首页</a> <a title="尾页" href="index.asp?<%if xshlmoe_tb<>"" then%>xshl5_moetype=<%=xshlmoe_tb%>&<%end if%>xshl_page=<%=pagecount%>">尾页</a> </li></ul> </div> </div> </div> </div> <% rs.close set rs=nothing %> <!--#include file=xshlconfigend.asp--> </body> </html> 请问怎么才能一打开页面就自动提交FORM表单呀?
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <!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>无标题文档</title> </head> <% if request.QueryString("action")="do" Then response.Write Request.QueryString("qq") response.end() end if %> <body onload="form1.submit();"> '<-----这里是重点。 <form name="form1" action="1.asp?action=do&qq=1" method="post"> </form> </body> </html> 希望对你有用。呼呼