var pselect=parent.document.getElementById("selobj").options[parent.document.getElementById("selobj").selectedIndex].value
function changeNum(num){
if (pselect=="")
{
alert ("select one server");
parent.forms1.select.focus();
return false;
}
return true;
}
上面是一个ifrme给主页面判断的问题,我想了好久,没有想出来,在以前,那个上传页面那里有一个iframe可以把值传过去,这个就是这个例子!今天试了一下,可以成功,晕,真是好搞笑,看来,就是上面的那个也把做得太复杂了吧,no try 不清楚!呵,有进步!
parent.forms1.select.value可以代替parent.document.getElementById("selobj").options[parent.document.getElementById("selobj").selectedIndex].value
if (pselect=="")可以换成if (parent.forms1.select.value=="")效果会更好!