我想要隐藏searchtextbox的文本,但我不知道该怎么做。我是一个Sharepoint noob,所以我觉得很容易做到,但我不知道如何...我把我的代码放在下面,希望它有所帮助:
<SharePoint:AjaxDelta ID="DeltaSiteLogo" runat="server" BlockElement="True">
<!--search-->
<SharePoint:AjaxDelta ID="DeltaPlaceHolderSearchArea" BlockElement="true" CssClass="ms-mpSearchBox ms-floatRight" runat="server">
<asp:ContentPlaceHolder ID="PlaceHolderSearchArea" runat="server">
<div id="searchInputBox">
<SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" />
<script type="text/javascript">
setTimeout(function () {
document.getElementById('SmallSearchInputBox').placeholder = 'Ex: SMS1234';
document.getElementById('SmallSearchInputBox').value = 'Ex: SMS1234';
}, 800);//time to wait for in ms
</script>
</div>
</asp:ContentPlaceHolder>
</SharePoint:AjaxDelta>
<SharePoint:SPLinkButton runat="server" CssClass="ms-siteicon-a" ID="x36d5bee949a7480783b3afc048c15598" NavigateUrl="~sitecollection/Pages/Inicio.aspx">
<SharePoint:SiteLogoImage name="onetidHeadbnnr0" runat="server" CssClass="ms-siteicon-img" ID="x74bbee6762f840edad4fe46f496d8c78" LogoImageUrl="/_layouts/15/images/siteIcon.png"></SharePoint:SiteLogoImage>
</SharePoint:SPLinkButton>
我关注this link,但此解决方案对我不起作用,并且它不会更改文本框的文本:
任何人都可以帮助我吗?非常感谢!