求救
时间:2011-11-18
来源:互联网
我想做一个这样的页面,打开以后自动载入某个网页,网页中有很多复选框,打开的时候自动选中我指定的几个复选框,请问该怎么做,请说的详细点,有源码最好,万分感谢
作者: newqq 发布时间: 2011-11-18
HTML code
要哪个被选中就指定其checked="checked"。。你也可以用JS。jquery去实现
<!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去实现
作者: zsx841021 发布时间: 2011-11-18
谢谢你,我的意思是选中别人网页上的复选按钮
作者: newqq 发布时间: 2011-11-18
比如,我想打开这个网站之后自动选择几个指点的复选框:http://www.dbjszgztp.com/prjvote/index.jsp
作者: newqq 发布时间: 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
%>
<!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
%>
作者: hefeng_aspnet 发布时间: 2011-11-18
可能是我没说清楚,就以上面的a和b页面来说,b页面的复选框初始状态是没有被选中的,我现在想要在a页面自动加载B页面,并自动是B页面的复选框选中
作者: newqq 发布时间: 2011-11-18
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28