Home > Backend Development > PHP Tutorial > 如何实现这种效果

如何实现这种效果

WBOY
Release: 2016-06-13 13:27:11
Original
923 people have browsed it

怎么实现这种效果
比如在顶端有一组radio 按钮,横着摆的,下面是一个div 层 层里面有个表单。
刚打开这个页面时候 没有radio 按钮被选中 然后层里面的表单显示灰色 就是不可以点。
再然后选中任何一个radio 就会显示层里面的不同的表单,同时不刷新页面,就是激活那样。

如何实现?

------解决方案--------------------
changeForm.html

HTML code




<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>check</title>



<script>
        function changeForm(param){
            document.getElementById("ifr").src = param;
        }
</script>
<div>
    <label><input type="radio" name="check" onclick="changeForm('form1.html')">form1</label>
    <label><input type="radio" name="check" onclick="changeForm('form2.html')">form2</label>
    <label><input type="radio" name="check" onclick="changeForm('form3.html')">form3</label><br>
    <iframe id="ifr" name="ifr" src="" frameborder="0" scrolling="no" style="border:0"></iframe>
</div>


<br><font color="#e78608">------解决方案--------------------</font><br>果断Ajax:<br>参考;<br>http://topic.csdn.net/u/20120513/19/6133363b-ea5a-4b36-b719-b0e8483a15e1.html<br>http://topic.csdn.net/u/20120516/09/dd9c19b5-bbf3-4f1f-bdbb-d58ade236f5f.html <div class="clear">
                 
              
              
        
            </div>
Copy after login
Related labels:
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