Jqgrid sample code that varies with the size of the window

Source: Internet
Author: User

  This article is mainly on the Jqgrid with the size of the window to adapt to the size of the sample code for a detailed introduction, the need for friends can come to the reference, I hope to help you.

The first type of:    Jqgrid varies with the window size adaptive width   code is as follows: $ (function () {            $ (window). Resiz E (function () {            $ ("#listId"). Setgridwidth ($ (window). width ());        });       &NBSP});    The second: The   code is as follows: Window.onresize = function  _doresize () {   va R ss = pageSize ();   $ ("#listId"). Jqgrid (' Setgridwidth ', SS. WINW-10). Jqgrid (' Setgridheight ', SS. WINH-200);   &NBSP}    function pageSize () {     var winw, winh;    if (window.innerheight) { All except ie     WINW = window.innerwidth;     winh = window.innerheight;   } else if (document.documentelement && document.documentElement.clientHeight) {//IE 6 Strict Mode    win W = document.documentelement.clientwidth;     winh = document.documentelement.clientheight;   } else if (docUment.body) {//other     WINW = document.body.clientwidth;     winh = Document.body.clien theight;   }  //for small pages and total size less then the viewport    return {WINW:WINW, Wi nh:winh}; }      

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.