先看一段代码(PHP例子)
1、表单代码(form.php):
<?php header("Content-type: text/html; charset=utf8"); ?> <iframe name="testIframeName" style="display:none;"></iframe> <form target="testIframeName" method="post" action="formAction.php"> <input type="text" name="username"/> <input type="password" name="password"/> <input type="submit" value=" 提 交 " /> </form>
<?php echo "<script>alert('test....');</script>"; ?>
哦~其实很基础的东西......就是form标签的属性问题.....如图: