如何获取以下提示并使用用户在提示中键入的内容并将其转换为 iFrame URL,如下所示:
<iframe src="http://www.weather.com" sandbox="" seamless="" width="100%" height="200 </iframe>
<html>
<head>
<script>
function disp_prompt()
{
var sitename=prompt("Please enter your Website:","www.anywebsite.com")
document.getElementById("msg").innerHTML="Your Site: " + sitename
}
</script>
</head>
<body>
<input type="button" onclick="disp_prompt()" value="Click to enter in Website URL">
<br><br>
<div id="msg"></div>
</body>
</html>