如何在Javascript中声明网格的大小百分比 [英] How Do I Declare The Size Of The Grid In Percentage In Javascript

查看:72
本文介绍了如何在Javascript中声明网格的大小百分比的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望这个脚本以百分比形式写入,其中高度和宽度以像素为单位声明。



 <   script    类型  =  text / javascript > ;  
$(document).ready(function()
{
Scroll();
});

函数Scroll(){

$('#<% = grdGridView.ClientID %> ')。滚动({

宽度:1320,
高度:350
});

}
< / script >

解决方案

(document).ready(function()
{
Scroll();
});

函数Scroll(){


('#<% = grdGridView.ClientID %> ')。滚动({

宽度:1320,
高度:350
});

}
< / script >


I want this script to be written in percentage where the height and width declared in pixels.

<script type="text/javascript">
                       $(document).ready(function ()
                       {
                            Scroll();
                       });

                       function Scroll() {

                           $('#<%=grdGridView.ClientID%>').Scroll({

                               width: 1320,
                               height: 350
                           });

                       }
                   </script>

解决方案

(document).ready(function () { Scroll(); }); function Scroll() {


('#<%=grdGridView.ClientID%>').Scroll({ width: 1320, height: 350 }); } </script>


这篇关于如何在Javascript中声明网格的大小百分比的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆