Ajax留下了一个奇怪的错误 [英] Ajax leaving a weird error
本文介绍了Ajax留下了一个奇怪的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
$("cApplication''.$col1.''").click(function(){
$.ajax({
url: "?page=acp_apps_check",
type: "post",
data: {capp:''.$col1.''},
success: function(){
alert("set session");
}
});
)};
以下Ajax代码离开这个错误无缘无故:
The following Ajax code leaves this error for no reason:
Uncaught RefernceError: $ is not defined
无法理解问题。
完整的PHP代码:
Can''t understand the problem.
Full PHP code:
echo '<head><script src="jquery.js"></script>
<script type="text/javascript">
$("cApplication'.$col1.'").click(function(){
$.ajax({
url: "?page=acp_apps_check",
type: "post",
data: {capp:'.$col1.'},
success: function(){
alert("set session");
}
});
});
</script>
</html></head>';
推荐答案
(cApplication''。
("cApplication''.
col1。'')。click(function(){
col1.''").click(function(){
.ajax({
url:?page = acp_apps_check ,
类型:post,
数据:{capp:''。
.ajax({ url: "?page=acp_apps_check", type: "post", data: {capp:''.
这篇关于Ajax留下了一个奇怪的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文