求高手指导:jquery只能为文本框设置一次值?为什么不能设置后再改值?
<form class="gsc-search-box gsc-search-box-tools" accept-charset="utf-8">
<table cellspacing="0" cellpadding="0" class="gsc-search-box">
<tbody>
<tr>
<td class="gsc-input">
<div class="gsc-input-box" id="gsc-iw-id1">
<table cellspacing="0" cellpadding="0" id="gs_id50" class="gstl_50 gsc-input" style="width: 100%; padding: 0px;">
<tbody>
<tr>
<td id="gs_tti50" class="gsib_a">
<input autocomplete="off" type="text" size="10" class="gsc-input" name="search" title="搜索" id="gsc-i-id1" style="width: 100%; padding: 0px; border: none; margin: 0px; height: auto; background: url("https://www.google.com/cse/static/images/1x/zh_CN/branding.png") left center no-repeat rgb(255, 255, 255); outline: none;" dir="ltr" spellcheck="false" />
</td>
<td class="gsib_b">
<div class="gsst_b" id="gs_st50" dir="ltr">
<a class="gsst_a" href="javascript:void(0)" style="display: none;" title="清空搜索框" role="button"><span class="gscb_a" id="gs_cb50" aria-hidden="true">×</span></a>
</div></td>
</tr>
</tbody>
</table>
</div></td>
<td class="gsc-search-button"><button class="gsc-search-button gsc-search-button-v2">
<svg width="13" height="13" viewbox="0 0 13 13">
<title>搜索</title>
<path d="m4.8495 7.8226c0.82666 0 1.5262-0.29146 2.0985-0.87438 0.57232-0.58292 0.86378-1.2877 0.87438-2.1144 0.010599-0.82666-0.28086-1.5262-0.87438-2.0985-0.59352-0.57232-1.293-0.86378-2.0985-0.87438-0.8055-0.010599-1.5103 0.28086-2.1144 0.87438-0.60414 0.59352-0.8956 1.293-0.87438 2.0985 0.021197 0.8055 0.31266 1.5103 0.87438 2.1144 0.56172 0.60414 1.2665 0.8956 2.1144 0.87438zm4.4695 0.2115 3.681 3.6819-1.259 1.284-3.6817-3.7 0.0019784-0.69479-0.090043-0.098846c-0.87973 0.76087-1.92 1.1413-3.1207 1.1413-1.3553 0-2.5025-0.46363-3.4417-1.3909s-1.4088-2.0686-1.4088-3.4239c0-1.3553 0.4696-2.4966 1.4088-3.4239 0.9392-0.92727 2.0864-1.3969 3.4417-1.4088 1.3553-0.011889 2.4906 0.45771 3.406 1.4088 0.9154 0.95107 1.379 2.0924 1.3909 3.4239 0 1.2126-0.38043 2.2588-1.1413 3.1385l0.098834 0.090049z"></path>
</svg></button></td>
<td class="gsc-clear-button">
<div class="gsc-clear-button" title="清除结果">
</div></td>
</tr>
</tbody>
</table>
</form>
--------------------------------------------
上文的html里面的:<input autocomplete="off" type="text" size="10" ...
jquery只能为该文本框设置一次值?为什么不能设置后再改值?
我用$("#gsc-i-id1").attr("value","ggg "); 在网页里面能看到设置进去了,但我再换一个值,yyy,则文本框的value依然是ggg,为什么?
另外很奇怪的问题,我对文中的button,使用jQuery进行点击操作,如下:
$('.gsc-search-button gsc-search-button-v2').click();
不起效?
为什么?