首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

如何判断IFRAME中有没有值

2012-03-09 
怎么判断IFRAME中有没有值?我想在父窗口operation.asp中实现判断子窗口upfile6.asp中有没有上传东西,有的

怎么判断IFRAME中有没有值?
我想在父窗口operation.asp
中实现判断子窗口upfile6.asp中有没有上传东西,有的话,就提示需要上传,应该怎么做?我对js了解太少,最好详细些,有实例的话可以给下参考.xiexie   !!!

 
父窗口operation.asp

<script   language= "JavaScript "   type= "text/JavaScript ">
       
  function   Check()
{
if(blform.Casename.value== " ")
{
alert( "请填写手术名称! ");
blform.Casename.focus();
return   false;
}
if(document.frames( "mqs6 ").Accessories6.value== " ")//这里不行啊!!!!
{
alert( "请上传影象! ");
return   false;
}
//-->
</script>

                            <form   action= "save_bl_action.asp "   method= "post "     name= "blform "   id= "blform ">
        <tr   bgcolor= "#ffffff ">  
                                    <td   align= "right "> <font   color= "#FF0000 "> * </font> 病例名称: </td>
                                    <td   colspan= "5 "   align= "left "   bgcolor= "#ffffff ">   <input   name= "Casename "   type= "text "   id= "Casename "   size= "55 "   /> </td>
                                </tr>
                                <tr   bgcolor= "#ffffff ">  
                                    <td   align= "right "> 手术影像: </td>
                                    <td   colspan= "5 "   align= "left "> <IFRAME   name=mqs6   marginWidth=0   marginHeight=0   src=upfile6.asp?filename= <%=filename%>   frameBorder=0   width=400   scrolling=no   height=100> </IFRAME> </td>
                                </tr>
                        </form>

子窗口upfile6.asp

<form   enctype= "multipart/form-data "   method= "post "   action= "upfile6.asp?act=up "   name= "form_up "   onSubmit= "return   checkform(); ">  
<table   cellpadding=0   cellspacing=0   width=100%   class=a4>
    <tr>  
        <td   height= "30 ">
<input   name=in_v   type=file   class= "editbox "   id= "in_v "   style= "width:330; "   size=60>  
            <input   type= "submit "   value= "上传 "   name=Submit   class= "button ">
        </td>


    </tr>
    <tr>
        <td   height= "30 ">
<select   name= "Accessories6 "   id= "Accessories6 "   class= "editbox "   style= "width:150; ">
                <%if   act   =   "up "   or   act   =   "delete "   or   act   =   "modify "   then
dim   i
Accessories6List6   =   split(session( "Accessories6List6 "), "| ")
for   i   =   0   to   ubound(Accessories6List6)
if   trim(Accessories6List6(i))   <>   " "   then%>
<option   value= " <%=Accessories6List6(i)%> "> <%=Accessories6List6(i)%> </option>
<%end   if
next
else
session.Contents.Remove( "Accessories6List6 ")
end   if%>
            </select>
            &nbsp;   <input   name= "Delete "   type= "button "   class= "button "   id= "Delete "   value= "删除 "   onClick= "javascript:DeleteFile(); ">
        </td>
    </tr>
</table>
</form>

[解决办法]
window.fmqs6

热点排行