0
我有一個param函數,我必須從NavDropdownListContainer動態獲取數據,並使用JQuery或JavaScript將其設置在搜索文本框中。動態更改SharePoint 2013搜索摘要中的內容
請在下面找到與之相關的截圖和css。
幫助,將不勝感激。
<div class="ms-floatLeft" id="SearchBox" name="Control">
<div class="ms-srch-sbLarge ms-srch-sb-borderFocused" id="ctl00_ctl38_g_c60051d3_9564_459e_8a40_e91f8abf4dcf_csr_sboxdiv">
<input title="Search Everything" class="ms-textLarge ms-srch-sbLarge-navWidth ms-srch-sb-prompt ms-helperText" id="ctl00_ctl38_g_c60051d3_9564_459e_8a40_e91f8abf4dcf_csr_sbox" accesskey="S" onkeydown="var ctl = $getClientControl(this);ctl.activateDefaultQuerySuggestionBehavior();" onkeypress="if (Srch.U.isEnterKey(String.fromCharCode(event.keyCode))) { $getClientControl(this).search(this.value);return Srch.U.cancelEvent(event); }" onfocus="var ctl = $getClientControl(this);ctl.hidePrompt();ctl.setBorder(true);" onblur="var ctl = $getClientControl(this);ctl.showPrompt();ctl.setBorder(false);" type="text" maxlength="2048" value="" autocorrect="off" autocomplete="off">
<a title="Navigation" class="ms-srch-sb-navLink ms-srch-sb-navLink-menuOpen" id="ctl00_ctl38_g_c60051d3_9564_459e_8a40_e91f8abf4dcf_csr_NavButton" onclick="$getClientControl(this).activateDefaultNavigationBehavior();return Srch.U.cancelEvent(event);" href="javascript: {}"> <img class="ms-srch-sbLarge-navImg" id="navImg" alt="Navigation" src="/_layouts/15/images/searchresultui.png?rev=23"> </a>
<a title="Search" class="ms-srch-sb-searchLink" id="ctl00_ctl38_g_c60051d3_9564_459e_8a40_e91f8abf4dcf_csr_SearchLink" onclick="$getClientControl(this).search($get('ctl00_ctl38_g_c60051d3_9564_459e_8a40_e91f8abf4dcf_csr_sbox').value);" href="javascript: {}"> <img class="ms-srch-sbLarge-searchImg" id="searchImg" alt="Search" src="/_layouts/15/images/searchresultui.png?rev=23"> </a>
<div class="ms-qSuggest-container ms-shadow" id="AutoCompContainer">
<div id="ctl00_ctl38_g_c60051d3_9564_459e_8a40_e91f8abf4dcf_csr_AutoCompList"></div>
</div>
<div class="ms-qSuggest-container ms-shadow" id="NavDropdownListContainer" style="display: block; visibility: visible; position: absolute;">
<div class="ms-qSuggest-list" id="ctl00_ctl38_g_c60051d3_9564_459e_8a40_e91f8abf4dcf_csr_NavDropdownList" style="width: 498px;">
<div class="ms-qSuggest-hListItem">Everything</div>
<div class="ms-qSuggest-listItem">Videos</div>
<div class="ms-qSuggest-listItem">People</div>
<div class="ms-qSuggest-listItem">Conversations</div>
</div>
</div>
</div>
</div>