我有这段代码,想在GoLargeSearch
单击图像时将输入传递给我的函数。
<div id="s4-searcharea-large">
<input accessKey="S" onkeydown="CoreInvoke('LargeSearchKeyDownGoSearch', event)" id="txtLargeSearchTerm" runat="server" class="ms-sharepointsearchtext" title="Enter search words" value="" maxLength="255" size="25" type="text" name="SearchString" />
<div class="ms-searchimage">
<span style="position: relative; width: 27px; display: inline-block; height: 27px; overflow: hidden" class="s4-clust">
<a style="width: 27px; display: inline-block; height: 27px" id="onetIDGoSearchLarge" title="Search" onclick="GoLargeSearch(document.getElementById('txtLargeSearchTerm'))" href="javascript:">
<img style="border-bottom: 0px; position: absolute; border-left: 0px; border-top: 0px; border-right: 0px;" alt="Search" src="/_layouts/GP_Custom/images/largesearch.png" />
</a>
</span>
</div>
</div>
如何获取输入的值以将其传递给GoLargeSearch
?这似乎不起作用:
onclick="GoLargeSearch(document.getElementById('txtLargeSearchTerm'))"