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

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

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

  2020-05-13 我要评论
复制代码 代码如下:

<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>

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们