Home >Web Front-end >JS Tutorial >Sample code for getting elements in frames in JS_javascript skills

Sample code for getting elements in frames in JS_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:27:551011browse
Copy code The code is as follows:

var oCombo = window.parent.frames["frmresourcetype"].document .getElementById('cmbType') ; Get the parent frame element
var oCombo = window.frames["frmresourcetype"].document.getElementById('cmbType') ; Get the child frame element
Statement:
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