iframe里面表单提交后如何跳出iframe重定向到另一个页面
if (isset($_POST['orderNo'])) { if (!empty($_POST['remark'])) { $form = "<form action=\"{$_POST['remark']}\" method=\"post\" target=\"_top\" id=\"resultForm\">"; foreach ($_POST as $key => $val) { $form .= "<input name=\"{$key}\" type=\"hidden\" value=\"{$val}\" />"; } $form .= "</form>"; echo $form; echo <<<SCRIPT <script> window.onload =function() { document.getElementById('resultForm').submit(); } </script> SCRIPT;
form元素target属性给_top值