【发布时间】:2014-07-27 15:44:56
【问题描述】:
这里是html
<body style="background-color:#999;font-size:12px;">
<div style="width:500px; height:500px; margin:30px auto; background-color:#9CC">
<input id="Test" type='text' placeholder='Hello how are you' style="width:270px;" / >
</div>
</body>
我只想知道文本宽度。 不是输入宽度也不是字符数。请帮我提出适当的建议。
【问题讨论】:
-
对于宽度文本,您是指长度还是像素?
-
他想要占位符文本的宽度。
-
好的,但是字符数例如(17 个字符)或宽度例如。 (100 像素)?
-
@napster3world
How to know Placeholder String width in px -
+1 提出一个好问题
标签: javascript jquery string placeholder