Home Web Front-end JS Tutorial Get the value in iframe through javascript sample code_javascript skills

Get the value in iframe through javascript sample code_javascript skills

May 16, 2016 pm 05:31 PM
iframe value

复制代码 代码如下:

<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>
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How do I crop an IFrame in HTML? How do I crop an IFrame in HTML? Aug 29, 2023 pm 04:33 PM

How do I crop an IFrame in HTML?

What does data-id in iframe mean? What does data-id in iframe mean? Aug 28, 2023 pm 02:25 PM

What does data-id in iframe mean?

Why does iframe load slowly? Why does iframe load slowly? Aug 24, 2023 pm 05:51 PM

Why does iframe load slowly?

What technology can replace iframe What technology can replace iframe Aug 24, 2023 pm 01:53 PM

What technology can replace iframe

What are the loading events of iframe? What are the loading events of iframe? Aug 28, 2023 pm 01:55 PM

What are the loading events of iframe?

What's the danger in iframes What's the danger in iframes Sep 08, 2023 pm 03:14 PM

What's the danger in iframes

What does iframe mean in Python? What does iframe mean in Python? Aug 25, 2023 pm 03:24 PM

What does iframe mean in Python?

Monitor iframe scrolling behavior Monitor iframe scrolling behavior Feb 18, 2024 pm 08:40 PM

Monitor iframe scrolling behavior

See all articles