彩虹天堂
技术源于生活
posts - 0,  comments - 2,  trackbacks - 0
frame传参不用ajax的

//index.html

<style>
a {
display:block;
margin-bottom:20px;
width:30px;
}
iframe {
width:400px;
height:300px;
border:1px solid #000;
}

</style>
<script>
window.onload=function(){
document.getElementById('x').onclick=function(){
frames['_left'].document.getElementById('a').innerHTML=frames['_right'].document.getElementById('b').value.replace(/

\n/g,'<br />');
}

}
</script>
<a href="#" id="x">点</a>

<iframe name="_left" src="1.html"></iframe>
<iframe name="_right" src="2.html"></iframe>



//1.html
<div id="a" style="background:#000;color:#fff;width:300px;height:400px;"></div>

//2.html
<textarea id="b" style="width:300px;height:300px;">
测试
</textarea>
posted on 2008-07-30 16:15 bcterry 阅读(503) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航:
 

<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

留言簿

文章档案

搜索

  •  

最新评论