/source/Plug-in/kind/examples/dynamic-load.html
http://prosporous.googlecode.com/ · HTML · 43 lines · 43 code · 0 blank · 0 comment · 0 complexity · 9d841f71690625ad5b68c7ba65376e14 MD5 · raw file
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8" />
- <title>Dynamic Load Examples</title>
- <style>
- form {
- margin: 0;
- }
- textarea {
- display: block;
- }
- </style>
- <script charset="utf-8" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
- <script>
- $(function() {
- var editor;
- $('input[name=load]').click(function() {
- $.getScript('../kindeditor-min.js', function() {
- KindEditor.basePath = '../';
- editor = KindEditor.create('textarea[name="content"]');
- });
- });
- $('input[name=remove]').click(function() {
- if (editor) {
- editor.remove();
- editor = null;
- }
- });
- });
- </script>
- </head>
- <body>
- <h3>????</h3>
- <form>
- <textarea name="content" style="width:800px;height:200px;"></textarea>
- <p>
- <input type="button" name="load" value="??JS??????" />
- <input type="button" name="remove" value="?????" />
- </p>
- </form>
- </body>
- </html>