0

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

<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"]'>";

打开用户之前输入的链接...怎么办?

4

1 回答 1

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"];?>'>";
于 2013-10-05T04:01:47.743 回答