开发者

GWT: IE problem

Element tdElement = (Element)leftContentPanel.getElement().getChild(0).getChild(0).getChild(0); tdElement.setAttribute("style", "vertical-align: top; w开发者_如何学JAVAidth:100%;");

tdElement.getAttribute("style") returns : [object CSSStyleDeclaration] >>> ON IE "width:100%;..." ON FF

Doesn't work on IE why???????


The solution is to use element.getStyle() that returns a Style object.

Ex:

Element tdElement = (Element)leftContentPanel.getElement().getChild(0).getChild(0).getChild(0);
        tdElement.getStyle().setWidth(100, Unit.PCT);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜