源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

jquery实现点击弹出可放大居中及关闭的对话框(附demo源码下载)

  • 时间:2021-04-10 16:01 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:jquery实现点击弹出可放大居中及关闭的对话框(附demo源码下载)
本文实例讲述了jquery点击弹出可放大居中关闭对话框。分享给大家供大家参考,具体如下: 运行效果截图如下: [img]http://files.jb51.net/file_images/article/201605/2016510113448898.jpg?2016410113726[/img] 具体代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jquery点击弹出可放大居中关闭对话框</title>
<link rel="stylesheet" type="text/css" href="css/jqpopup.css"/>
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery.bgiframe.min.js"></script>
<script type="text/javascript" src="js/jqDnR.min.js"></script>
<script type="text/javascript" src="js/jquery.jqpopup.min.js"></script>
</head>
<body>
<div id="sampleformdiv" style="display:none" title="1st jQpopup box">
  <div class="annotationName">描述</div>
  <div class="annotation">点击关闭该弹出窗口</div>
</div>
<div id="sampleformdiv1" style="display:none" title="模块选择器">
  <form method="post" id="butt" name="butt" action="">
    <input type="button" value="确定"/>
    <input type="button" value="取消"/>
  </form>
  <div class="sele">
    <select class="u">
      <option value="CMS">CMS</option>
      <option value="General" selected="">General</option>
      <option value="Else">Else</option>
    </select>
    <select class="u">
      <option value="CMS">CMS</option>
      <option value="General" selected="">General</option>
      <option value="Else">Else</option>
    </select>
    <select class="u">
      <option value="CMS">CMS</option>
      <option value="General" selected="">General</option>
      <option value="Else">Else</option>
    </select>
  </div>
  <table border="1" cellpadding="2" cellspacing="2">
    <tr>
      <td></td>
      <td>名称</td>
      <td>标签</td>
      <td>前缀</td>
      <td>...</td>
    </tr>
    <tr>
      <td><input type="radio" value="radio" name="r1" id="r1"></td>
      <td>分类控件</td>
      <td>2</td>
      <td>re</td>
      <td>222</td>
    </tr>
    <tr>
      <td><input type="radio" value="radio" name="r2" id="r2"></td>
      <td>分类控件</td>
      <td>2</td>
      <td>re</td>
      <td>222</td>
    </tr>
    <tr>
      <td><input type="radio" value="radio" name="r3" id="r3"></td>
      <td>分类控件</td>
      <td>2</td>
      <td>re</td>
      <td>222</td>
    </tr>
    <tr>
      <td><input type="radio" value="radio" name="r4" id="r4"></td>
      <td>分类控件</td>
      <td>2</td>
      <td>re</td>
      <td>222</td>
    </tr>
    <tr>
      <td><input type="radio" value="radio" name="r5" id="r5"></td>
      <td>分类控件</td>
      <td>2</td>
      <td>re</td>
      <td>222</td>
    </tr>
  </table>
</div>
<p><input type="button" class="stdbtn" id="open_btn" value="Click 1"/></p><br/>
<p><input type="button" class="stdbtn" id="open_btn1" value="Click 2"/></p><br/>
<script type="text/javascript">
$(document).ready(function(){
  $("#open_btn").click(function(){
    $("#sampleformdiv").jqpopup_open(this.id);
  });
  $("#open_btn1").click(function(){
    $("#sampleformdiv1").jqpopup_open(this.id);
  });
});
</script>
<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
<p>适用浏览器:IE8、360、FireFox、Chrome、Safari、Opera、傲游、搜狗、世界之窗.</p>
</div>
</body>
</html>
完整实例代码点击此处[url=http://xiazai.jb51.net/201605/yuanma/jquery-center-close-able-dialog(jb51.net).rar]本站下载[/url]。 更多关于jQuery相关内容感兴趣的读者可查看本站专题:《[url=http://www.1sucai.cn/Special/514.htm]jQuery切换特效与技巧总结[/url]》、《[url=http://www.1sucai.cn/Special/497.htm]jQuery拖拽特效与技巧总结[/url]》、《[url=http://www.1sucai.cn/Special/451.htm]jQuery扩展技巧总结[/url]》、《[url=http://www.1sucai.cn/Special/430.htm]jQuery常见经典特效汇总[/url]》、《[url=http://www.1sucai.cn/Special/104.htm]jQuery动画与特效用法总结[/url]》、《[url=http://www.1sucai.cn/Special/75.htm]jquery选择器用法总结[/url]》及《[url=http://www.1sucai.cn/Special/200.htm]jQuery常用插件及用法总结[/url]》 希望本文所述对大家jQuery程序设计有所帮助。
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部