jsp 使用jquery进行子页面与父页面相互取值
父页面取子页面的元素:
//取子页面下的所有单选框
var checkboxs = $(window.frames["mainFrame"].document).find("input:checked");
//弹出id
alert(checkboxs[0].id);
//弹出选中状态
alert(checkboxs[0].checked);
子页面取父页面的元素:
//取父页面的select被选中的option
var id = $('#devlist',parent.document).find("option:selected").attr("value");

浙公网安备 33010602011771号