Posted in Javascript onMay 10, 2016
本文实例讲述了jquery点击弹出可放大居中关闭对话框。分享给大家供大家参考,具体如下:
运行效果截图如下:
具体代码如下:
<!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>
完整实例代码点击此处本站下载。
希望本文所述对大家jQuery程序设计有所帮助。
jquery实现点击弹出可放大居中及关闭的对话框(附demo源码下载)
- Author -
shichen2014声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@