ajax输出中的Jquery错误 [英] Jquery error in the ajax output
问题描述
我已经为车辆制作了搜索引擎。它有3个下拉菜单,我使用$('select')。CustomSelect();改变他们的风格。当我运行这个搜索引擎时,它运行正常,一切都很好。
但是当我在另一个页面上通过AJAX调用相同的东西时,它会在此自定义选择行上显示错误。
< script src = jquery-1.11.0.min.js type = text / javascript< /跨度>>< /脚本>
< script>
$( document )。ready( function (){
// callsearchengine(allproducts,);
$( #searchengine)。load(' http://www.mywebsite.com/search/allproducts.php?id=');
});
< / script>
$('select')。CustomSelect(); line在allproducts.php文件中。
请帮助!
我有什么尝试过:
我尝试了所有可能的方法,这几天都在努力解决这个问题。
( '选择')CustomSelect();改变他们的风格。当我运行这个搜索引擎时,它运行正常,一切都很好。
但是当我在另一个页面上通过AJAX调用相同的东西时,它会在此自定义选择行上显示错误。
< script src = jquery-1.11.0.min.js type = text / javascript< /跨度>>< /脚本>
< script>
( document )。ready( function (){
// callsearchengine(allproducts,);
( #searchengine)。load(< span class =code-string>' http://www.mywebsite.com/search/allproducts.php?id=');
});
< / script>
I have made a search engine for vehicles. It has 3 dropdowns and I am using $('select').CustomSelect(); to change their styles. When I run this search engine it works fine, all good.
However when I call the same thing through AJAX on another page, it shows error on this customselect line.
<script src="jquery-1.11.0.min.js" type="text/javascript"></script>
<script>
$(document).ready(function(){
// callsearchengine("allproducts", "");
$("#searchengine").load('http://www.mywebsite.com/search/allproducts.php?id=');
});
</script>
The $('select').CustomSelect(); line is in the allproducts.php file.
Please help!
What I have tried:
I tried all possible ways, its been days am struggling with this.
('select').CustomSelect(); to change their styles. When I run this search engine it works fine, all good.
However when I call the same thing through AJAX on another page, it shows error on this customselect line.
<script src="jquery-1.11.0.min.js" type="text/javascript"></script> <script>
(document).ready(function(){ // callsearchengine("allproducts", "");
("#searchengine").load('http://www.mywebsite.com/search/allproducts.php?id='); }); </script>
The
这篇关于ajax输出中的Jquery错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!