1) 判斷元素是否存在
$("#yourid").length>0 表示id爲yourid的元素存在,否則表示不存在;
2) 獲取父窗口的元素
$("#yourid", opener.document)
等同於普通寫法opener.document.getElementById("yourid").
3)判斷父窗口指定元素是否存在
$("#yourid",opener.document).length>0表示存在,否則不存在
4)在父窗口中操作,選中IFRAME中的所有單選鈕
$(window.frames["iframe1"].document).find("input[@type='radio']").attr("checked","true");
5)在IFRAME中操作,選中父窗口中的所有單選鈕
$(window.parent.document).find("input[@type='radio']").attr("checked","true");