Home > Article > Web Front-end > How to use Jquery to pop up an editable dialog box_html/css_WEB-ITnose
How to use Jquery to pop up an editable dialog box
http://www.weiboxiu.cn/plugin/lhgdialog4/demo/demo.html Take a look at this one. Based on JQ
http://www.veryhuo.com/a/view/40564.html
This just pops up a dialog box
<!doctype html><html lang="en"><head> <meta charset="utf-8"> <title>jQuery UI Dialog - Modal confirmation</title> <link rel="stylesheet" href="css/base/jquery.ui.all.css"> <script src="js/jquery-1.10.2.js"></script> <script src="js/jquery.ui.core.js"></script> <script src="js/jquery.ui.widget.js"></script> <script src="js/jquery.ui.button.js"></script> <script src="js/jquery.ui.position.js"></script> <script src="js/jquery.ui.dialog.js"></script> <style> body { font-size: 62.5%; font-family: "Trebuchet MS", "Arial", "Helvetica", "Verdana", "sans-serif";} .resize{resize:none;} </style> <script> $(function() { $( "#dialog-confirm" ).dialog({ resizable: false, height:140, modal: true, buttons: { Save: function() { $("#view_content").html($("#edit_content").val()); $( this ).dialog( "close" ); }, Cancel: function() { $( this ).dialog( "close" ); } } }); }); </script></head><body><div id="dialog-confirm" title="Edit Dialog"> <textarea id="edit_content" class="resize"></textarea></div><div id="view_content"></div></body></html>