scrawl.html 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title></title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  6. <meta name="robots" content="noindex, nofollow"/>
  7. <script type="text/javascript" src="../internal.js"></script>
  8. <link rel="stylesheet" type="text/css" href="scrawl.css">
  9. </head>
  10. <body>
  11. <div class="main" id="J_wrap">
  12. <div class="hot">
  13. <div class="drawBoard border_style1">
  14. <canvas id="J_brushBoard" class="brushBorad" width="360" height="300"></canvas>
  15. <div id="J_picBoard" class="picBoard" style="width: 360px;height: 300px"></div>
  16. </div>
  17. <div id="J_operateBar" class="operateBar">
  18. <span id="J_previousStep" class="previousStep">
  19. <em class="icon"></em>
  20. <em class="text"><var id="lang_input_previousStep"></var></em>
  21. </span>
  22. <span id="J_nextStep" class="nextStep">
  23. <em class="icon"></em>
  24. <em class="text"><var id="lang_input_nextsStep"></var></em>
  25. </span>
  26. <span id="J_clearBoard" class="clearBoard">
  27. <em class="icon"></em>
  28. <em class="text"><var id="lang_input_clear"></var></em>
  29. </span>
  30. <span id="J_sacleBoard" class="scaleBoard">
  31. <em class="icon"></em>
  32. <em class="text"><var id="lang_input_ScalePic"></var></em>
  33. </span>
  34. </div>
  35. </div>
  36. <div class="drawToolbar border_style1">
  37. <div id="J_colorBar" class="colorBar"></div>
  38. <div id="J_brushBar" class="sectionBar">
  39. <em class="brushIcon"></em>
  40. <a href="javascript:void(0)" class="size1">1</a>
  41. <a href="javascript:void(0)" class="size2">3</a>
  42. <a href="javascript:void(0)" class="size3">5</a>
  43. <a href="javascript:void(0)" class="size4">7</a>
  44. </div>
  45. <div id="J_eraserBar" class="sectionBar">
  46. <em class="eraserIcon"></em>
  47. <a href="javascript:void(0)" class="size1">1</a>
  48. <a href="javascript:void(0)" class="size2">3</a>
  49. <a href="javascript:void(0)" class="size3">5</a>
  50. <a href="javascript:void(0)" class="size4">7</a>
  51. </div>
  52. <div class="sectionBar">
  53. <div class="addImgH">
  54. <em class="icon"></em>
  55. <em class="text"><var id="lang_input_addPic"></var></em>
  56. <form method="post" id="fileForm" enctype="multipart/form-data" class="addImgH_form" target="up">
  57. <input type="file" name="upfile" id="J_imgTxt"
  58. accept="image/gif,image/jpeg,image/png,image/jpg,image/bmp"/>
  59. </form>
  60. <iframe name="up" style="display: none"></iframe>
  61. </div>
  62. </div>
  63. <div class="sectionBar">
  64. <span id="J_removeImg" class="removeImg">
  65. <em class="icon"></em>
  66. <em class="text"><var id="lang_input_removePic"></var></em>
  67. </span>
  68. </div>
  69. </div>
  70. </div>
  71. <div id="J_maskLayer" class="maskLayerNull"></div>
  72. <script type="text/javascript" src="scrawl.js"></script>
  73. <script type="text/javascript">
  74. var settings = {
  75. drawBrushSize:3, //画笔初始大小
  76. drawBrushColor:"#4bacc6", //画笔初始颜色
  77. colorList:['c00000', 'ff0000', 'ffc000', 'ffff00', '92d050', '00b050', '00b0f0', '0070c0', '002060', '7030a0', 'ffffff',
  78. '000000', 'eeece1', '1f497d', '4f81bd', 'c0504d', '9bbb59', '8064a2', '4bacc6', 'f79646'], //画笔选择颜色
  79. saveNum:10 //撤销次数
  80. };
  81. var scrawlObj = new scrawl( settings );
  82. scrawlObj.isCancelScrawl = false;
  83. dialog.onok = function () {
  84. exec( scrawlObj );
  85. return false;
  86. };
  87. dialog.oncancel = function () {
  88. scrawlObj.isCancelScrawl = true;
  89. };
  90. </script>
  91. </body>
  92. </html>