JQuery在chrome中不起作用 [英] JQuery not work in chrome
问题描述
Hai Everyone
jQuery在Google Chrome中不起作用,但它在ie8,fire fox中工作。
我的实际过程是我要改变高度和宽度table。我的JQuery代码是
Hai Everyone
jQuery not work in Google Chrome,but it work in ie8,fire fox.
My actual process is i want change the height and width of the table .My JQuery code is
function InitLoad() {
var w = $(window).width();
var windowHight = $(window).height() - 123;
if (PageTitle == "Default.aspx") {
$(".centertbl").css({ "height": windowHight + "px" });
$(".centertbl").css({ "width": w + "px" });
$(".fowi").css({ "width": w + "px" });
}
}
和
i调用.centertbl作为html表中的类
and
i call .centertbl as class in html table
<table class="centertbl" width="100%"
style="background-color: #C0C0C0; overflow: hidden; margin :0px">
<tr>
<td style="padding-removed 1%; height: 5px" colspan="2"></td>
</tr></table>
以上代码用于根据浏览器内部高度和宽度更改高度和宽度,如果我在ie8和mozila中运行它将工作。它将动态改变高度和宽度,但我镀铬它不工作请回复如何解决这个问题并支持所有浏览器。
请尽快回复
问候
Aravind
the above code worked for change the height and width based on browser inner height and width for table,if i run in ie8 and mozila it will work.i.e it will dynamically change height and width,but i chrome it not work pls reply how to solve this problem and also support all browser.
Pls reply asap
Regards
Aravind
推荐答案
( window )。width();
var windowHight =
(window).width(); var windowHight =
( window )。 height() - 123 ;
if (PageTitle == Default.aspx){
(window).height() - 123; if (PageTitle == "Default.aspx") {
( 。 centertbl)。css({ height:windowHight + px});
(".centertbl").css({ "height": windowHight + "px" });
这篇关于JQuery在chrome中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!