
JavaScript
万物皆字节
思君 思国 思社稷,
赏花 赏月 赏秋香
展开
-
chrome插件获得http请求头
background.jschrome.webRequest.onBeforeSendHeaders.addListener(function (details) { const requestHeaders = details.requestHeaders console.log(requestHeaders) for (let i = 0; i < requestHeaders.length; i++) { const .原创 2021-11-29 22:20:31 · 4874 阅读 · 4 评论 -
JS面向对象的一种写法
封装的好处是代码重用,将变量保存和保护卡里起来如下例子(prototype方式):let TF_SOCK = function (onopen, onmessage, onclose) { this.tf_sock = null; this.onopen = onopen; this.onmessage = onmessage; this.onclose = onclose;}TF_SOCK.prototype = { init_socket: functio原创 2021-08-01 14:30:36 · 127 阅读 · 0 评论 -
VUE xxx
记录新建文件夹 a、npm init -y b、npm install vuecomputed watch组件 Vue.component()原创 2021-06-23 22:29:58 · 308 阅读 · 6 评论 -
jquery的ajax和post
今天在写东西的时候,用的$.ajax老是不能达到效果,好像有缓存一样,后来是在没有办法,我换了一个方法 $.post(以前我最喜欢使用的),呵呵 成功了,有的时候一条路不能达到目标可以试着去换一种方式实现,这样也节约时间,提高了效率!原创 2013-08-04 08:37:44 · 1108 阅读 · 0 评论 -
Extjs 学习之记录
Ext.container.Viewport代表浏览器窗口的整个区域,将document body作为渲染对象,它会根据浏览器窗口的大小自动调整自身的尺寸,在一个页面中只允许出现一个Viewport实例。此外它没有提供对滚动条的支持,如果需要使用滚动条需要在其子面板中进行设置。原创 2013-08-23 22:23:21 · 726 阅读 · 0 评论 -
extjs 给column 加上提示
src="${pageContext.request.contextPath }/extjs/examples/simple-widgets/qtips.js">原创 2014-04-27 11:04:41 · 971 阅读 · 0 评论 -
extjs xmlStore
var store3 = new Ext.data.XmlStore({// store configsautoDestroy : true,autoLoad : true,storeId : 'myStore1',url : 'test.xml', // automatically configures a HttpProxy// reader configsreco原创 2014-04-27 11:09:33 · 1116 阅读 · 0 评论 -
Uncaught SyntaxError: Unexpected end of input
Today, while I was working with jQuery I ran on this error “Uncaught SyntaxError: Unexpected end of input” while troubleshooting my code in Chrome. And since Chrome it didn’t report error on any speci转载 2014-05-10 05:40:08 · 5707 阅读 · 0 评论 -
初学 Ext.extends
Ext.onReady(function() {var win = new com.test.win({title : 'test1',width : 200,height : 300}).show();win.ss();});xx.jsExt.namespace('com.test');com.test.win = function(config)原创 2014-05-10 05:46:14 · 927 阅读 · 0 评论 -
extjs 分页,使用jsp传递数据
Ext.onReady(function() {var store3 = new Ext.data.JsonStore({url : "service.do",root : 'data',fields : [ 'id', "name", "pw" ]});store3 = new Ext.data.JsonStore({ autoDestroy: t原创 2014-05-25 10:32:54 · 756 阅读 · 0 评论 -
jquery 获得元素的 xy坐标,不知道可不可用
var X = $('#DivID').position().top;var Y = $('#DivID').position().left;原创 2014-09-04 07:36:44 · 1231 阅读 · 0 评论 -
table滚动时固定首行
转自:http://blog.youkuaiyun.com/qq378527566/article/details/7786126效果图如下:初始化的画面:拉动滚动条:[html] view plain copy> html> head> title>固定表头title> head>转载 2016-08-13 12:27:22 · 8481 阅读 · 1 评论