随笔分类 - Javascript
摘要:{header:'描述',renderer: renderDescn }function renderDescn(value, cellmeta, record, rowIndex, columnIndex, store) { var id= record.data.Id;//字段名,区分大小写return "<a href='dtl.aspx?id="+id+"'>"+str+"</a>";}{header: "图片操作",dataIndex: 'E
阅读全文
摘要:第一种方法: 如果使用的提交按钮是button 不是submit 以及服务器控件 可以在ajax返回结果之后document.getElementById('form').submit(); 第二种: function BeginSubmit() { var txt = ""; jQuery.aja
阅读全文
摘要:Ext中 renderer一般用于Grid中对列模型的渲染上 其详细信息记录在 Ext.grid.ColumnModel 中的setRenderer( Number col, Function fn ) 方法里一、col : Number The column index二、fn : FunctionThe function to use to process the cell's raw data to return HTML markup for the grid view. The render function is called with the following para
阅读全文
摘要://gridP gridpanel idExt.apply(Ext.getCmp("gridP").store.baseParams, { 参数1: 111, 参数2:222 }); grid = new Ext.grid.GridPanel({ frame: true, id: 'gridP', title: 'Order List', stripeRows: true, //斑马线 store: store, applyTo: 'view', //指定显示数据的div trackMouseOv...
阅读全文
摘要:var s = ""; s += " 网页可见区域宽:"+ document.body.clientWidth; s += " 网页可见区域高:"+ document.body.clientHeight; s += " 网页可见区域宽:"+ document.body.offsetWidth +" (包括边线和滚动条的宽)"; s += " 网页可见区域高:"+ document.body.offsetHeight +" (包括边线的宽)"; s += &
阅读全文
摘要:报错:错误: 对象不支持“createContextualFragment”属性或方法解决办法:在页面执行时加入如下代码if ((typeof Range !== "undefined") && !Range.prototype.createContextualFragment) { Range.prototype.createContextualFragment = function (html) { var frag = document.createDocumentFragment(), div = doc...
阅读全文
摘要:var model = grid.getSelectionModel(); model.selectAll();//选择所有行 model.selectFirstRow();//选择第一行 model.selectLastRow([flag]);//选择最后一行,flag为正的话保持当前已经选中的行数,不填则默认false model.selectNext();//选择下一行 model.selectPrevious();//选择上一行 model.selectRange(tartRow,ndRow, [Boolean keepExisting] );//选择范围间的行 mode...
阅读全文
摘要:event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) - document.body.clientLeft + "px";event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) - document.body.clien
阅读全文
摘要:前几天开发Web系统的时候,发现IE对模态窗口支持不怎么友好,在模态窗口中的提交事件会引发再一次打开原来的页面。后来在网上找了一下,好一点的解决方法都是用Iframe框架来完成的。但是如果要打开多个模态页面的话,就可能要多个Iframe的框架页面。比较郁闷,不过后来想的了一个更好点的方法,只要用一个模态页面就全部搞定,呵呵,所以列出了给有同样需要的人参考。第一:新建一个Iframe的框架页面VGAMesosphere.aspx。前台代码:myOpen.returnValue=1View Code <%@ Page Language="C#" AutoEventWire
阅读全文
摘要:javascript:document.write(document.body.innerHTML.replace(/</g, "<").replace(/>/g, ">")) 只是特殊字符转义下罢了
阅读全文