关于iframe的src付给地址的问题
<script>
//var sp=window.location.pathname.split( "/ ");
//var cc=sp[sp.length-1]+window.location.search;
//var dd=cc.split( "FileUrl= ")[1];
window.document.all.iframe.src= 'Web_ymscwcqk.aspx?strddrq=20070412 ';
</script>
<iframe id= "iframe " width= "100% " height= "90% " > </iframe>
这样应该没有问题吧,怎么浏览的时候iframe里面什么也没有呢
我本想截取页面传递的地址,地址是截取到了,可是传递给iframe没有反应呀,我只好直接付给iframe地址了,可是这样也没有用呀,请问哪里出错了呢
[解决办法]
window.document.getelements( "iframe ").src= 'Web_ymscwcqk.aspx?strddrq=20070412 '
[解决办法]
<html>
<head>
<script type= "text/javascript ">
function changesrc(url){
var iframe=document.getElementById( "iframe ");
iframe.src=url;
}
</script>
</head>
<body>
<iframe id= "iframe " src= "frameA.html "> </iframe>
<input type= "button " onclick= "javascript:changesrc( 'frameB.html ') " value= "changesrc( 'frameB.html ') ">
<input type= "button " onclick= "javascript:changesrc( 'frameA.html ') " value= "changesrc( 'frameA.html ') ">
</body>
</html>
<html>
<body>
Frame A.................
</body>
</html>
<html>
<body>
Frame B..............
</body>
</html>