用javascript给表格文字数值

来源:互联网 发布:java风清扬 编辑:程序博客网 时间:2024/05/01 14:13
<tr>
        <td height="128" valign="top" id="tableguanggao1">
 <!-- <img src="images1/Snap2_27.gif" width="778" height="128" />-->
  <%
     if not rs_guanggao.eof then
  
  while not rs_guanggao.eof
    if rs_guanggao("id")=9 then
 %>
 <img src="<%=rs_guanggao("tupianlianjie")%>" width="778" height="128" />
 <%
   ' else
'       response.Write("该广告不存在!")
    end if
    rs_guanggao.movenext
    wend
    rs_guanggao.movefirst
    else
       response.Write("该广告不存在!")
    end if
 %>
 <script language="javascript">
   if(document.getElementById("tableguanggao1").innerText=="")
   {  
       //输出提示文字
       document.getElementById("tableguanggao1").innerText="该广告位为空!";
    //输出图片
    //document.write("<img src='images1/Snap2_27.gif' width='778' height='128' />");
   }
   </script> 
原创粉丝点击