如何在Document.Location中为Open打开$ POST方法

时间:2013-10-05 03:35:56

标签: php post get

我需要插入用户输入的网址:

<input name="endereco" type="text" size="90" maxlength="900" />

在:

document.location.href = "IN_HERE";

类似于:

document.location.href = "$ _POST [" address "]";

echo "<meta HTTP-EQUIV='Refresh' CONTENT='0;URL=$_POST["endereco"]'>";

打开用户先前输入的链接...怎么做?

1 个答案:

答案 0 :(得分:0)

<input type="text" name="endereco" id="endereco">
<script>
$(document).ready(function() {
var url=document.getElementById("endereco").value;
document.location.href=url;
});
</script>

echo "<meta HTTP-EQUIV='Refresh' CONTENT='0;URL=<?php echo $_POST["endereco"];?>'>";