通过javascript获取iframe里的值示例代码


<script type="text/javascript" language="javascript">
function CCCC(){
var File_NAME="";
var count=0;
if(document.frames("myFrame").document.all.length){
for(var i=0;i<document.all.length;i++){
if(document.frames("myFrame").document.all(i).type == 'checkbox' && document.frames("myFrame").document.all(i).checked== true) {
File_NAME=document.frames("myFrame").document.all(i).value;
alert(File_NAME);
count++;
}
}
}
if(count==1){
var url="<%=path%>/AttSSSS?File_NAME="+File_NAME;
var returnValue=showModalDialog(url,"AttSSSS","dialogWidth:700px;dialogHeight:500px;dialogLeft:400px;dialogTop:200px;center:yes;help:yes;resizable:yes;status:yes");
if(returnValue){
window.location.href= window.location.href;
}
}
else if(count<1){
alert('您还没有选择信息,请在需要选择的条目点击鼠标!');
}
else{
alert('每次只能选择一条信息!');
}
}
</script>

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wdgggy.html