聪明文档网

聪明文档网

最新最全的文档下载
当前位置: 首页> js知识笔记

js知识笔记

时间:2012-04-14 10:02:23    下载该word文档

1取页面高度

:

DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

方法

Document.documentElement.clientHeight

网页可见区域宽:document.documentElement.clientWidth
网页可见区域高:document.documentElement.clientHeight
网页可见区域宽:document.documentElement.offsetWidth (包括边线的宽)
网页可见区域高:document.documentElement.offsetHeight (包括边线的宽)
网页正文全文宽:document.documentElement.scrollWidth
网页正文全文高:document.documentElement.scrollHeight
网页被卷去的高:document.documentElement.scrollTop
网页被卷去的左:document.documentElement.scrollLeft
网页正文部分上:window.screenTop
网页正文部分左:window.screenLeft
屏幕分辨率的高:window.screen.height
屏幕分辨率的宽:window.screen.width
屏幕可用工作区高度:window.screen.availHeight
屏幕可用工作区宽度:window.screen.availWidth

不含DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

方法:

Document.body.clientHeight


网页可见区域宽:document.body.clientWidth
网页可见区域高:document.body.clientHeight
网页可见区域宽:document.body.offsetWidth (包括边线的宽)
网页可见区域高:document.body.offsetHeight (包括边线的宽)
网页正文全文宽:document.body.scrollWidth
网页正文全文高:document.body.scrollHeight
网页被卷去的高:document.body.scrollTop
网页被卷去的左:document.body.scrollLeft
网页正文部分上:window.screenTop
网页正文部分左:window.screenLeft
屏幕分辨率的高:window.screen.height
屏幕分辨率的宽:window.screen.width
屏幕可用工作区高度:window.screen.availHeight
屏幕可用工作区宽度:window.screen.availWidth

网页禁止右键、禁止复制等代码大全

20090611 星期四 12:36

删除表中的列

var table=document.getElementById('show');

//alert(document.getElementById(id).rowIndex);

//var tr=document.getElemenntById(id).rowIndex;

table.deleteRow(document.getElementById(id).rowIndex);

Extjs 中下拉列表第一次取值不正确问题:加监听器

ExtJS Combobox 如何设置默认和取值问题

学习ExtJs,如何给combobox选中某一行, 取值问题。

///following is for stores combobox
        var readerLocation = new Ext.data.WCFJsonReader({
            root: 'data', id: 'Store', totalProperty: 'totalCount',
            fields: [
                    { name: 'Store', type: 'int' },

                    { name: 'StoreName', type: 'string' }

                     /*0:'All', '1':'ShangHai', '2':'BeiJing' */

                ]
        });
        var storeStore = new Ext.data.Store({
            proxy: new Ext.data.WCFHttpProxy({
                url: '/*.svc/GetStoresList'
            }),
            reader: readerLocation,
            remoteSort: true,
            listeners: {
                load: function() {
                    comboLocation.setValue(comboLocation.getValue());
                }
            }

        });
        var comboLocation = new Ext.form.ComboBox({
            store: storeStore,
            displayField: 'StoreName',
            valueField: 'Store',
            id: 'comboboxStore',
            typeAhead: true,
            mode: 'local',
            triggerAction: 'all',
            selectOnFocus: true,
            value: '',
            width: 180,
            applyTo: 'ddlStore'
        });

        storeStore.load();
        storeStore.on("load", onstoreStoreLoad, storeStore, true);
        function onstoreStoreLoad() {
            if (storeStore.getTotalCount() > 0)
                comboLocation.setValue(storeStore.getAt(0).data.Store);
        }
        /*** above is for location ***/

点击按钮 取值like

Ext.get("btnFilter").on("click", displayGrid);

function displayGrid() {

            var storeFilter = comboLocation.getValue();

});

 

Hope it helps! Enjoy!

免费下载 Word文档免费下载: js知识笔记

  • 29.8

    ¥45 每天只需1.0元
    1个月 推荐
  • 9.9

    ¥15
    1天
  • 59.8

    ¥90
    3个月

选择支付方式

  • 微信付款
郑重提醒:支付后,系统自动为您完成注册

请使用微信扫码支付(元)

订单号:
支付后,系统自动为您完成注册
遇到问题请联系 在线客服

常用手机号:
用于找回密码
图片验证码:
看不清?点击更换
短信验证码:
新密码:
 
绑定后可用手机号登录
请不要关闭本页面,支付完成后请点击【支付完成】按钮
遇到问题请联系 在线客服