Home  >  Article  >  Web Front-end  >  通过js增加style中某个样式的值_html/css_WEB-ITnose

通过js增加style中某个样式的值_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:24:521039browse






点击增高按钮后,想实现select1的高度增加4px,但实际上点击后select的高度没有发生变化,请教大家如何写?谢谢!

回复讨论(解决方案)

document.form1.select1.style.height+=parseInt(document.form1.select1.style.height)+4

谢谢楼上的, 已经搞定,应该是这样的:document.form1.select1.style.height=parseInt(document.form1.select1.style.height)+4,楼上多了个+,感谢感谢!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn