我需要插入用户输入的网址:
<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"]'>";
打开用户先前输入的链接...怎么做?
答案 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"];?>'>";