php js ajax get 没反应,求助. 将 <script src="jquery-1.5.1.min.js"></script> <script src="url.js"></script>放在head里面 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用firebug查看下是否错误提示信息... cc()未执行,你是因为url.js都没调用,将jquery类库和url.js 放在head里面,这样调用cc(),才会生效。 1、js文件放在哪里都无关紧要,当然最好是放在 head 标签内2、既然你已经加载了 jquery,那么就应该使用 jquery 提供的 ajax 功能,而不是自己再写一套function cc(){localurl = document.location; $.get('http://localhost/test.php', {curl:$(location).attr('href')}); }或$(function() { $('[vdata="go"]').click(function() { $.get('http://localhost/test.php', {curl:$(location).attr('href')}, function(d){ alert(d)}); }); }); <a href="http://www.google.com/" vdata="go">This is ads1</a><br/> <a href="http://www.bing.com" vdata="go">This is ads2</a><br/> <a href="http://www.baidu.com" vdata="go">This is ads3</a>3、至于你的代码中的问题,多半是xmlHttp=new XMLHttpRequest();引起的。不是每个浏览器都有 XMLHttpRequest 的 amfphp连接oracle 10g ereg问题 smarty一直提示Warning: Smarty error: unable to read resource: "index.html" PHP200人高级群 85758199 现有190人 满的话加2群:87768463 用iconv转换ISO-8859-1到GB2312后,文章内容被截断 请教一个关于游戏开发的问题 请求一个函数,给分100,在线等 大家帮我调一个简单的程序,谢谢,快急死了 高分求将MySQL数据库的表结构和数据导出的sql语句 新手问路 求一个正则表达式,使用preg_match 织梦系统后台问题
2、既然你已经加载了 jquery,那么就应该使用 jquery 提供的 ajax 功能,而不是自己再写一套
function cc(){
localurl = document.location;
$.get('http://localhost/test.php', {curl:$(location).attr('href')});
}
或$(function() {
$('[vdata="go"]').click(function() {
$.get('http://localhost/test.php', {curl:$(location).attr('href')}, function(d){ alert(d)});
});
});
<a href="http://www.google.com/" vdata="go">This is ads1</a><br/>
<a href="http://www.bing.com" vdata="go">This is ads2</a><br/>
<a href="http://www.baidu.com" vdata="go">This is ads3</a>3、至于你的代码中的问题,多半是
xmlHttp=new XMLHttpRequest();
引起的。不是每个浏览器都有 XMLHttpRequest 的