SharePoint Excel Services ECMAScript 示例之明日限行
办公教程导读
收集整理了【SharePoint Excel Services ECMAScript 示例之明日限行】办公软件教程,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2421字,纯文字阅读大概需要4分钟。
办公教程内容图文
1 <div id='resultdiv'></div> 2 <script type="text/javascript"> 3 if (window.attachEvent) 4 { 5 window.attachEvent("onload", Page_Load); 6 } 7 else 8 { 9 window.addEventListener("DOMContentLoaded", Page_Load, false); 10 } 11 12 function Page_Load() 13 { 14 Ewa.EwaControl.add_applicationReady(GetEwa); 15 } 16 17 function GetEwa() 18 { 19 om =Ewa.EwaControl.getInstances().getItem(0); 20 var range = om.getActiveWorkbook().getRange("Limit", 0, 0, 6, 2); 21 range.getValuesAsync(0, Limit, range); 22 } 23 24 function Limit(asyncResult) 25 { 26 var values = asyncResult.getReturnValue(); 27 var week = new Date().getDay(); 28 var value; 29 switch(week) 30 { 31 case 0: 32 value = values[week + 1][1]; 33 break; 34 case 1: 35 value = values[week + 1][1]; 36 break; 37 case 2: 38 value = values[week + 1][1]; 39 break; 40 case 3: 41 value = values[week + 1][1]; 42 break; 43 case 4: 44 value = values[week + 1][1]; 45 break; 46 default: 47 value = null; 48 break; 49 } 50 if(value == null) 51 { 52 document.getElementById('resultdiv').innerText = "明日不限号"; 53 } 54 else 55 { 56 document.getElementById('resultdiv').innerText = "明日限号:" + value; 57 } 58 } 59 </script>
View Code
办公教程总结
以上是为您收集整理的【SharePoint Excel Services ECMAScript 示例之明日限行】办公软件教程的全部内容,希望文章能够帮你了解办公软件教程SharePoint Excel Services ECMAScript 示例之明日限行。
如果觉得办公软件教程内容还不错,欢迎将网站推荐给好友。