开发者

add % value programmatically

I have the following code which gives me an error. I want to add the width property programmatically and in %:

firstcombo.width = 90%;

But that gives me the following err开发者_JAVA百科or:

  • 1084 syntax error expecting rightparen before colon

What is the correct syntax?


Try:

firstcombo.percentWidth = 90;


The width combobox property is a Number. you need to set it accordingly. Something like firstCombo.width = .9 * X where X is the value you want 90% of.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜