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> 

  • 相关阅读:
    AtCoder Beginner Contest 199(Sponsored by Panasonic)
    牛客练习赛81
    Linux查看日志定位问题
    mysql慢查询诊断
    本地安装jenkins,github拉取Python代码,并执行python脚本
    Mac升级到big sur之后,根目录无法写入文件如何解决?
    mysql 查看当前事务
    MongonDb在thinkphp中常用的功能整理(模糊查询)
    PHP操作MongoDB之|增-删-改-查|
    将MySQL中数据导入到MongoDB中
  • 原文地址:https://www.cnblogs.com/mishy/p/1845726.html
Copyright © 2011-2022 走看看