且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在“内容”页面中访问“脚本”功能

更新时间:2023-12-01 19:22:46

document )。ready( function (){
(document).ready(function () {


' #<%= SearchText.ClientID%>')。autocomplete({
source: function (request,response ){
('#<%=SearchText.ClientID%>').autocomplete({ source: function (request, response) {


.ajax({
url: SearchSuggestions。 asmx / GetSuggestions
data: {'searchValue':' + request.term + '}
类型: POST
dataType: json
contentType: application / json; charset = utf-8
成功: function (结果){
response(result.d);
},
错误: function (结果){
alert(' 处理您的请求时出现问题');
}

});
}
});
});
.ajax({ url: "SearchSuggestions.asmx/GetSuggestions", data: "{ 'searchValue': '" + request.term + "' }", type: "POST", dataType: "json", contentType: "application/json;charset=utf-8", success: function (result) { response(result.d); }, error: function (result) { alert('There is a problem processing your request'); } }); } }); });



它在Default.aspx上运行正常。但在其他内容页面上,此代码似乎不起作用。


it works fine on Default.aspx. but on other content pages this code does not seems working.