EXCL قوية للغاية ، ويمكن للعديد من الوظائف المدمجة أو الصيغ يمكن أن تحسن بشكل كبير من قدرة المعالجة للبيانات. هل هناك عناصر تحكم مماثلة في الويب؟ بعد بعض البحث ، وجدت أن الولادة لديها صيغ دعم وظيفة Excel الأساسية ويمكنها تحرير البيانات في الوقت الفعلي. بالإضافة إلى ذلك ، فإنه يدعم عملية السحب ، Ctrl+C ، Ctrl+V ، إلخ. من حيث دعم المتصفح ، فإنه يدعم المتصفحات التالية: IE7+، FF ، Chrome ، Safari ، Opera.
أولاً ، يتم تقديم ملفات المكتبة ذات الصلة. لا يتم تضمين دعم الصيغة في الوسيط. full.js ويجب تقديمه بشكل منفصل:
<script src = "http://handsontable.github.io/handsontable-rulejs/lib/jquery/jquery-1.10.2.js"> </script> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/handsontable/handsontable.full.js"> </script> <link rel = "stylesheet" media = "screen" href = "http://handsontable.github.io/handsontable-rulejs/lib/handsontable/handsontable.full.css"> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/lib/lodash/lodash.js"> </cript> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/lib/underscore.string/underscore.string.js"> </script> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/lib/moment/moment.js"> </cript> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/lib/moment/moment.js"> </cript> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/lib/numeral/numeral.js"> </script> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/lib/numericjs/numeric.js"> </script> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/lib/js-md5/md5.js"> </cript> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/lib/js-md5/md5.js"> </cript> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/lib/jstat/jstat.js"> </script> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/lib/parser.js"> </script> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rips> <scripts </scripts </scripts </scripts </scripts </script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/js/parser.js"> </script> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs src = "http://handsontable.github.io/handsontable-rulejs/lib/handsontable/handsontable.formula.js"> </script>
ضع حاوية Div في HTML لتخزين التحكم القابل للألم:
<Body> <div id = "handontable-code"> </viv> </body>
في رمز JavaScript ، احصل أولاً على حاوية Div ثم قم بإنشاء التحكم في الجدول:
<script type = "text/javaScript"> $ (document) .Ready (function () {var data1 = [['= $ b $ 2' ، "maserati" ، "mazda" ، "return 1+2 ؛ 2941 ، 4303 ، 354 ، 5814] ، [2010 ، 5 ، 2905 ، 2867 ، '= sum (a4 ، 2 ، 3)' ، '= $ b1'] ، [2011 ، 4 ، 2517 ، 4822 ، 552 ، 6127] ، [2012 ، '= sum (a2: a5)' ، ' 4151] //cellproperties.Readonly = True ؛ // إرجاع نوع البيانات: "html" ، // " $ (#msg "). html (decodeuri (data)) ؛ // hideloading () ؛ td.appendchild (newValue) ؛ السلبيات Valuerenderer) ؛ Handontable.Helper.Stringify (this.instance.getdata () [col]) ؛ </script>يتم توفير صيغة = Sum (B5 ، E3) بواسطة RuleJs. إرجاع 1+2 هو البرنامج النصي C# Code الذي تم تنفيذه من قبل نفسك. تحتاج إلى النقر لتحليل:
CSENGINE من الفئة العامة: ihttphandler {private static int count = 0 ؛ Public Void ProcessRequest (HttpContext Context) {context.response.contenttype = "text/plain" ؛ حاول {count ++ ؛ سلسلة ret = "" ؛ رمز السلسلة = context.request ["CODE"]. ToString () ؛ if (string.isnullorempty (code)) {ret = "parameter error" ؛ } آخر {scriptOptions Options = ScriptOptions.Default .adDreferences (Assembly.getAsembly (typeof (dbservices.dataAccess))) //.addimports("System.data ") //.addimports("System.data.sqlient"). var state = csharpscript.runasync (رمز ، خيارات) .result.returnvalue ؛ ret = state.toString () ؛ الدولة = فارغة ؛ الخيارات = فارغة ؛ } console.writeline (count) ؛ context.Response.write (ret) ؛ } catch (استثناء ex) {// error console.writeLine (count) ؛ }} bool public isReusable {get {return false ؛ }}}قم بتشغيل الرمز على النحو التالي:
ما سبق هو كل محتوى هذه المقالة. آمل أن يكون ذلك مفيدًا لتعلم الجميع وآمل أن يدعم الجميع wulin.com أكثر.