欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

用按鈕控制iframe顯示的網(wǎng)頁實(shí)現(xiàn)方法

 更新時(shí)間:2013年02月04日 09:55:57   作者:  
在iframe中顯示的網(wǎng)頁已經(jīng)是一件平凡無奇的事了,不過可能依然有很多的童鞋沒不知所措吧,沒關(guān)系,因?yàn)楸疚牡某霈F(xiàn)將會(huì)帶你脫離苦海,感性的朋友可以了解下啊,或許對(duì)你有所幫助
復(fù)制代碼 代碼如下:

//有兩個(gè)按鈕分別響應(yīng)兩個(gè)事件,用來控制iframe顯示的網(wǎng)頁。
<script type="text/javascript">
function bd(){
var baidu = document.getElementById("i");
baidu.src = "http://www.baidu.com";
}
function xl(){
var sina = document.getElementById("i");
sina.src = "http://www.sina.com.cn";
}
</script>
<style type="text/css">
#i{
width:400px;
height:300px;
}
</style>
</head>

<body>
<iframe id = "i" scrolling = "no">
</iframe>
<div>
<input type = "button" value ="百度" onclick = "bd()"/>
<input type = "button" value ="新浪" onclick = "xl()"/>
</div>
</body>

相關(guān)文章

最新評(píng)論