jquery + Css 模式对话框

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title>模式对话框示例</title>
  <meta name="Generator" content="EditPlus">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
     <script src="jquery-1.5.2.min.js" type="text/javascript"></script>
     <script type="text/javascript" language="javascript">
     $(function () {
         $(".selTree").live("click",function () { $(".empTree,.bgDiv").show(); });
         $(".close").live("click",function () {
            $(this).parents(".shq,.box").hide();
            $(".bgDiv").hide();
            });
          
 
     });
     </script>
     <style type="text/css" >
  .bgDiv{position:absolute;top:0px; background:url(../images/divBg2.png); display:none;width:100%;height:100%}
  .shq{ width:507px; height:488px; border:5px solid #219ACF; position:absolute;margin-left:-253px;left:50%;top:60px; background:#EBF3F6; display:none}
  .boxHead{ width:100%; height:27px; background:url(../images/box_bg.jpg) repeat-x;}
  .boxHead div{margin-left:10px}
  .shTitle{margin-left:10px; height:25px; line-height:25px; float:left}
  .shClose{width:20px; cursor:pointer; float:right; color:#94938E; font-weight:bold;font-size:16px;height:25px; line-height:25px;}
    </style>
 </head>
 
 <body>
    <input type="button" id="button" value="模式对话框"  class="selTree" />

    <!--选择查看 -->
    <div class="bgDiv"></div>
        <div class="shq empTree" name="shq" style="height:425px; width:425px; display:none">
        <div class="boxHead">
          <div class="shTitle">选择查看</div>
          <div class="shClose close">×</div>
        </div>
              asdfasdfasdf
              <input type="submit" name="button2" id="button2" value="确定" class="btn close"/>
             <input type="submit" name="button3" id="button3" value="取消" class="btn close"/>
    </div>
 </body>
</html>

 

 

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title>模式对话框示例</title>
  <meta name="Generator" content="EditPlus">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
     <script src="jquery-1.5.2.min.js" type="text/javascript"></script>
     <script type="text/javascript" language="javascript">
     $(function () {
         $(".selTree").live("click",function () { $(".bgDiv,.empTree").show(); });
         $(".close").live("click",function () {
            $(this).parents(".shq,.box").hide();
            $(".bgDiv").hide();
            });
            $(".bgDiv").height($(document).height());
            $(".close").live("click",function () {
               $(this).parents(".shq,.box").hide();
               $(".bgDiv").hide();
             });

     });
     </script>
     <style type="text/css" >
  .bgDiv{position:absolute;top:0px; background:url(../images/divBg2.png); display:none;width:100%;height:100%}
  .shq{ width:507px; height:488px; border:5px solid #219ACF; position:absolute;margin-left:-253px;left:50%;top:60px; background:#EBF3F6; display:none}
  .boxHead{ width:100%; height:27px; background:url(../images/box_bg.jpg) repeat-x;}
  .boxHead div{margin-left:10px}
  .shTitle{margin-left:10px; height:25px; line-height:25px; float:left}
  .shClose{width:20px; cursor:pointer; float:right; color:#94938E; font-weight:bold;font-size:16px;height:25px; line-height:25px;}
    </style>
 </head>
 
 <body>
    <input type="button" id="button" value="模式对话框"  class="selTree" />

    <!--选择查看 -->
    <div class="bgDiv"></div>
        <div class="shq empTree" name="shq" style="height:425px; width:425px; display:none">
        <div class="boxHead">
          <div class="shTitle">选择查看</div>
          <div class="shClose close">×</div>
        </div>
              asdfasdfasdf
              <input type="submit" name="button2" id="button2" value="确定" class="btn close"/>
             <input type="submit" name="button3" id="button3" value="取消" class="btn close"/>
    </div>
 </body>
</html>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

万事俱备,就差一个程序员了

谢谢您,赏俺根辣条,尝尝鲜.谢

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值