js
共 4 篇文章
dhtmlxTabbar
1. Tabbar initialization a. Initialize TabBar Object from Javascript Constructor <script src="../codebase/dhtmlxcommon.js"></script> <script src="../codebase/dhtmlxtabbar.js"></script> <div id="a_tabbar" style="width:400;height:100"></div> <script> tabbar=new dhtmlXTabBar("a_tabbar"); tabbar.setIma…
2012-11-01 11:16 · js
JSON技术介绍
XML ——这种用于表示客户端与服务器间数据交换有效负载的格式,几乎已经成了Web services的同义词。我们知道AJAX技术能够使得每一次请求更加迅捷,对于每一次请求返回的不是整个页面,也仅仅是所需要返回的数据。然而,由于 Ajax和REST技术的出现影响了应用程序架构,这迫使人们开始寻求`XML的替代品,如:JavaScript Object Notation(JSON)。 JSON 作为一种更轻、更友好的 Web services客户端的格式(多采用浏览器的形式或访问 REST风格 Web服务的Ajax应用程序的形式)引起了 Web 服务供应商的注意。通常AJAX通过返回XML格式…
2012-08-30 14:34 · js
JS对浏览器判断
JS对浏览器判断: <script language="JavaScript" type="text/javascript"> if ((navigator.userAgent.indexOf('MSIE') >= 0) && (navigator.userAgent.indexOf('Opera') < 0)){alert('你是使用IE')}else if (navigator.userAgent.indexOf('Firefox') >= 0){alert('你是使用Firefox')}else if (navigator.userAgent.indexOf('Opera') >= 0…
2012-08-27 17:53 · js
JS监听整个页面的回车事件
JS监听整个页面的回车事件 <script type="text/javascript"> document.onkeydown=keyDownSearch; function keyDownSearch(e) { // 兼容FF和IE和Opera var theEvent = e || window.event; var code = theEvent.keyCode || theEvent.which || theEvent.charCode; if (code == 13) { getTableListData();//具体处理函数 return false; } return tru…
2012-07-30 17:15 · js · 回车事件