zoukankan      html  css  js  c++  java
  • 简单的弹出层窗口应用(DIV+JS)


     

    代码
    <script language="javascript" type="text/javascript">
            
    //显示写评语
            function showDiv()
            {
                document.all.divShow.style.pixelLeft 
    =300;
                document.all.divShow.style.pixelTop 
    = 150;
                document.all.divShow.style.display 
    = "block";
                
    return false;
            }
          
    //不同意取消
           function closeDiv()
           {
               document.getElementById(
    "<%=txRemark.ClientID %>").value = "";
               document.all.divShow.style.display 
    = "none";
               
    return false;
           }
           
    //不同意确定按钮前判断
           function fun_Enter()
           {
              
    var _val =  document.getElementById("<%=txRemark.ClientID %>").value;
              
    if(_val == "")
              {
                  alert(
    "<%=res.GetResource("SYS.REPORTS_GGEC.TEXT1")%>");
                  
    return false;
              }
              
    else
              {
                 document.all.divShow.style.display 
    = "none";
                 
    return true;
              }
           }
        
    </script>
    代码
    <!---层内容---->
       
    <div id="divShow" style="display: none; position: absolute; border: solid 1px black">
           
    <fieldset>
               
    <legend>
                   
    <%=res.GetResource("SYS.REPORTS_GGEC.TEXT1")%>
               
    </legend>
               
    <table id="DivTable" width="300px">             

            
    <tr>
                       
    <td>
                           
    <%=res.GetResource("SYS.REPORTS_GGEC.TEXT2")%>
                       
    </td>
                       
    <td align="right">
                           
    <asp:TextBox ID="txRemark" runat="server" SkinID="rem" Width="250px" Height="100px"
                               TextMode
    ="multiLine"></asp:TextBox>
                       
    </td>
                   
    </tr>
                   
    <tr>
                       
    <td align="right" colspan="2">
                           
    <asp:Button ID="btnEnter" runat="server" SkinID="Button" Text="确定" OnClientClick="jscript:return fun_Enter();"
                               OnClick
    ="btnEnter_Click" />
                           
    <asp:Button ID="btnCancel" runat="server" SkinID="Button" Text="取消" OnClientClick="jscript:return closeDiv();" />
                       
    </td>
                   
    </tr>
               
    </table>
           
    </fieldset>
       
    </div> 

  • 相关阅读:
    MySQL插入数据获得自动增长的ID
    C#解决“System.Threading.ThreadStateException:“在可以调用 OLE 之前,必须将当前线程设置为单线程单元(STA)模式。请确保您的 Main 函数带有 STAThreadAttribute 标记。 只有将调试程序附加到该进程才会引发此异常”的异常
    C# 关闭当前窗体的时候打开另一个窗口
    C# WinForm中关闭指定的窗体
    MySQL 8.0 版本修改字符编码
    微信支付API v3接口使用应用篇
    Linux Tomcat安装篇(daemon运行,开机自启动)
    Linux nginx安装篇
    SpringCloud系列之Nacos+Dubbo+Seata应用篇
    SpringCloud系列之Nacos+Dubbo应用篇
  • 原文地址:https://www.cnblogs.com/mishy/p/1845726.html
Copyright © 2011-2022 走看看