[英]Calling Jquery file function from code behind page
我在Empdocs.js文件中獲得了以下功能
$('。resetButton')。click(function(){$('#searchField')。val('');});
如何從VB.Net或C#頁面后面的代碼中調用此函數?
我已經嘗試了以下功能,但無法正常工作。
ClientScript.RegisterClientScriptBlock(Me.GetType,“ resetfunction”,“ resetButton();”,True)
創建重置-功能:
function Reset() {
$('#searchField').val('');
}
$('.resetButton').on("click", Reset);
從服務器端,您可以致電
ClientScript.RegisterClientScriptBlock(Me.GetType, "resetfunction", "Reset();", True)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.