我使用以下代码打开一个新窗口:
purchaseWin = window.open("Purchase.aspx","purchaseWin2", "location=0,status=0,scrollbars=0,width=700,height=400");
我想访问purchaseWin的dom树,例如
purchaseWin.document.getElementById("tdProduct").innerHTML = "2";
它不起作用。我只能这样做:
purchaseWin.document.write("abc");
我也试试这个,但它也不起作用:
$(purchaseWin.document).ready(function(){
purchaseWin.$("#tdProduct").html("2");
});
我该怎么办?