求救

newqq 2011-11-18 09:10:01
我想做一个这样的页面,打开以后自动载入某个网页,网页中有很多复选框,打开的时候自动选中我指定的几个复选框,请问该怎么做,请说的详细点,有源码最好,万分感谢
...全文
92 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
newqq 2011-11-18
  • 打赏
  • 举报
回复
可能是我没说清楚,就以上面的a和b页面来说,b页面的复选框初始状态是没有被选中的,我现在想要在a页面自动加载B页面,并自动是B页面的复选框选中
csdn_aspnet 2011-11-18
  • 打赏
  • 举报
回复
a.html:
<!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>
</head>
<body>
<iframe src="b.html"></iframe>
</body>
</html>

b.html:
<!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>
</head>
<body>
<input id="Checkbox1" type="checkbox" checked="checked"/>
<input id="Checkbox2" type="checkbox" />
<input id="Checkbox3" type="checkbox" />
<input id="Checkbox4" type="checkbox" checked="checked"/>
<input id="Checkbox5" type="checkbox" />
<input id="Checkbox6" type="checkbox" />
</body>
</html>
如果对数据库查询那你就判断某一字段循环 如:
<%
do while not rs.eof then
if rs("sign")=1 then
response.write "<input id='Checkbox1' type='checkbox' checked='checked'/>"
else
response.write "<input id='Checkbox1' type='checkbox'/>"
end if
rs.movenext
loop
%>



newqq 2011-11-18
  • 打赏
  • 举报
回复
比如,我想打开这个网站之后自动选择几个指点的复选框:http://www.dbjszgztp.com/prjvote/index.jsp
newqq 2011-11-18
  • 打赏
  • 举报
回复
谢谢你,我的意思是选中别人网页上的复选按钮
三石-gary 2011-11-18
  • 打赏
  • 举报
回复

<!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>
</head>
<body>
<input id="Checkbox1" type="checkbox" checked="checked"/>
<input id="Checkbox2" type="checkbox" />
<input id="Checkbox3" type="checkbox" />
<input id="Checkbox4" type="checkbox" checked="checked"/>
<input id="Checkbox5" type="checkbox" />
<input id="Checkbox6" type="checkbox" />
</body>
</html>

要哪个被选中就指定其checked="checked"。。你也可以用JS。jquery去实现

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧