node.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>Node Examples</title>
  6. <link rel="stylesheet" href="../themes/default/default.css" />
  7. <script src="../kindeditor.js"></script>
  8. <style>
  9. .cls {
  10. border : 1px solid #A0A0A0;
  11. margin : 10px;
  12. padding : 10px;
  13. cursor: pointer;
  14. }
  15. .on {
  16. border : 1px solid red;
  17. background-color : #F0F0F0;
  18. }
  19. </style>
  20. <script>
  21. KindEditor.ready(function(K) {
  22. K('.cls').mouseover(function(e) {
  23. K(this).addClass('on');
  24. })
  25. .mouseout(function(e) {
  26. K(this).removeClass('on');
  27. })
  28. .click(function(e) {
  29. eval(K.unescape(K(this).html()));
  30. });
  31. });
  32. </script>
  33. </head>
  34. <body>
  35. <div class="cls">K('div#id').addClass('cls');</div>
  36. <div class="cls">K('div.class').css('margin', '10px');</div>
  37. <div class="cls">K('#id img').css('border', '1px solid #000').attr('title', 'hello');</div>
  38. <div class="cls">K('#id > div').width(200).height(50).css('border', '1px solid #000');</div>
  39. <div class="cls">K('a[href="\\#"]').attr('href', 'http://www.kindsoft.net/');</div>
  40. <div id="id">
  41. <div class="class">class1</div>
  42. <div class="class"><a href="#" target="_blank">class2</a></div>
  43. <a href="#" target="_blank"><img src="http://www.kindsoft.net/images/logo_180_30.gif" /></a>
  44. </div>
  45. </body>
  46. </html>