我的代码如下
<div data-role="content" id="div1" align="top" style="padding:3 !important;" >
<table border="0" align="CENTER" cellspacing="0" width="100%" style="vertical- align: text-bottom;" >
<tr>
<td></td>
<td>
<div id="question1" class="question">
<input type="text" id="question" />
<Style>
#question{
font:5px;
font-family:verdana;
}
</style>
</div>
</td></tr><tr>
<td width="50"><img id="img2" width="40" height="36" style="float:right; margin-top: 0px;" ></td>
<td style="text-align:center;">
<div class="ui-grid-b" >
<div class="ui-block-a"><button id="button1" type="submit" data-theme="b" style="font-size:0.8em;"></button></div>
<div class="ui-block-b"><button id="button2" type="submit" data-theme="b" style="font-size:0.8em;"></button></div>
<div class="ui-block-c"><button id="button3" type="submit" data-theme="b" style="font-size:0.8em;"></button></div>
</div>
</td>
</tr>
</table>
</div>
在上面的代码块中,在下面的代码行中
<input type="text" id="question" />
当通过 jQuery 填充值时,我所做的就是
$('.question').text(questionText);
当我在我的 iPhone 中查看它时,当文本长于宽度时,它会转到下一行。我认为 textarea 是唯一具有多行的 HTML 标签。不知道为什么这里的文字是多行的,我该如何避免?我不介意文字被切断,但我真的不希望它变成多行。