reg.html
reg.html页面中有个iframe标签,通过iframe去请求php校验用户名是否可用。
html>head>metacharset=utf-8>title> iframe局部刷新title>head>body>formmethod=postaction=> 用户名:inputtype=textid=unamename='username' />spanid=msgstyle=color:red;>span>form>iframeborder='0'width='0'height='0'id='myiframe' >iframe>scripttype=text/javascript>//当用户名输入框失去焦点时让iframe请求check_reg.php document.getelementbyid('uname').onblur = function(){if(this.value != '') { document.getelementbyid('myiframe').src = 'check_reg.php?username='+ this.value; } } script>body>html>
check_reg.php
').addclass('pre-numbering').hide(); $(this).addclass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadein(1700); }); }); 以上就介绍了php通过iframe实现局部刷新,包括了iframe方面的内容,希望对php教程有兴趣的朋友有所帮助。