嗨通過調用父鏈接頁面值到它的iframe鏈接頁面 示例代碼傳遞價值,它的iframe我要傳遞的價值是如何從父母使用javascript
<html>
<head>
<title>
</title>
<script>
function sendvalue(v){
alert(v);
}
</script>
</head>
<body>
<form id="f">
<input type="button" value="123" onclick="sendvalue(this.value)">
</form>
<iframe id="frame1" src="a.html" width="500px;"></iframe>
</body>
</html>
a.html
<html>
<head>
<title>
</title>
<script>
</script>
</head>
<body>
<h3> Frame</h3>
<form id="myform">
Req value <input type="text" name="a" id="a">
</form>
</body>
</html>
當我調用sendvalue函數時,值應該傳遞給iframe鏈接頁面,用於輸入字段的形式。 這是如何實現的。
[從窗口傳遞值給iframe]可能的副本(http://stackoverflow.com/questions/536538/pass-value-to-iframe-from-a-window) –
可能的http:// stackoverflow .COM /問題/ 935127 /如何對訪問父iframe的從JavaScript的 –