点击弹出层的html代码???_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 09:41:59
Original
1457 people have browsed it

<html><head><form method="POST" action="1.html" content="text/html; charset=utf-8" /><title>LIGHTBOX EXAMPLE</title><style type="text/css"><style>.list {display:none;position:absolute;z-index:1002;top:25%;left:35%;text-align:center;	border:1px solid #11a2ea; BORDER-BOTTOM: 0px solid #11a2ea; BORDER-LEFT: 0px solid #11a2ea;	WHITE-SPACE: nowrap;TEXT-ALIGN: center;background-color:#fff;}.list TD {	FONT-SIZE: 12px; border:1px solid #11a2ea;  TEXT-ALIGN: center}</style></head><body><table id="u5" class="list" align="center" cellspacing="0" cellpadding="6"  ><tr>   <td>名称</td>   <td><input type="text" name="pcname" id="pcname"></td></tr><tr>  <td>地址</td>  <td><input type="text" name="pc" id="pc"></td></tr><tr>  <td>默认服务器</td>  <td><select name="pc_server" id="pc_server" onchange="this.form.submit();"><option value="ddd">ddd</option><option value="ccc">ccc</option>  </select><input type="hidden" name="tex" id="tex"></td></tr><tr>  <td colspan="2"><input type="submit" name="yes" value="确定" />  <input type="submit" name="no" value="取消" /></td></tr></table></body></html>
Copy after login




这个弹出层的纯html代码里有个 select onchange 事件只要选择就会退出弹的层,

请问用html 如何可以解决这个onchange 选择事件的问题,

有个前提是不用JS 代码来解决,用JS是可以实现,有没有直接用html来直接实现的呢,谢谢


回复讨论(解决方案)

你连问题的原因都不清楚,还说什么解决,
这是onchange事件提交表单刷新页面引起的,
除非你不提交,否则js也解决不了

代码是复制错了,没错就是提交刷新引起的,不过我用JS就不会有这样的问题,一刷新弹出的层就关闭,现在用只能JS解决了。

一种用js实现弹出层一种修改select 无刷新联动就不会因为提交而关闭了

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!