asp中,在一个按钮中添加一个过程,怎么做?
<inputtype="button"name="Submit10"value="一键登录">按钮<%dowhilenotrs.eofifrs("user_id")=0t...
<input type="button" name="Submit10" value="一键登录" > 按钮
<%
do while not rs.eof
if rs("user_id") = 0 then
rs.movenext
else
sql = "select * from 001_Server where id = "& rs("server_id")
rs3.open sql,conn,1,1
response.Write("<script>alert('即将登陆挂机服务器');window.open(""cont.asp"",""newwindow"",""height=600,width=900,left=0,top=0,toolbar=yes,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no"");</script>")
rs3.close
rs.movenext
end if
loop
%>
过程 展开
<%
do while not rs.eof
if rs("user_id") = 0 then
rs.movenext
else
sql = "select * from 001_Server where id = "& rs("server_id")
rs3.open sql,conn,1,1
response.Write("<script>alert('即将登陆挂机服务器');window.open(""cont.asp"",""newwindow"",""height=600,width=900,left=0,top=0,toolbar=yes,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no"");</script>")
rs3.close
rs.movenext
end if
loop
%>
过程 展开
1个回答
展开全部
<input type="button" name="xxxx" value="xxxx" onclick="javascript:dosomething()" />
<script >
function dosomething(){
//这里就是JS处理模块
}
</script>
<script >
function dosomething(){
//这里就是JS处理模块
}
</script>
追问
谢谢!,但我是初学者,不熟悉js..能否根据我给的代码,把这段代码写入按钮功能里?
追答
function dosomething(){
alert('即将登陆挂机服务器');
window.open("cont.asp","newwindow","height=600,width=900,left=0,top=0,toolbar=yes,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no");
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询