Ajax 板


LINE

我想顺便问一下 AJAX 可以跟Jquery共用吗? 要如何撷取AJAX的ITEM的值 放到Jquery? 这是改过的程式... <head> <script type="text/javascript" src="adapter/ext/ext-base.js"></script> <script type="text/javascript" src="ext-all.js"></script> <script type="text/javascript" src="jquery-1.3.2.js"></script> <script type="text/javascript" > Ext.onReady(function(){ Ext.QuickTips.init(); Ext.form.Field.prototype.msgTarget = 'side'; Ext.form.Field.prototype.align = 'center'; var bd = Ext.getBody(); var create_form = new Ext.FormPanel({ labelWidth: 75, frame:true, title: '填写会员资料', url: '_register.php', bodyStyle:'padding:5px 5px 0', width: 400, defaults: {width: 230}, defaultType: 'textfield', items: [{ fieldLabel: '帐号', name: 'account', allowBlank:false }, ... { fieldLabel: '手机号码', name: 'cellphone', inputType : "password", allowBlank:false } ], buttons: [ { text: '送出', handler: senddata }, { text: '重设', handler: function(){ create_form.getForm().reset(); } } ] }); function senddata() { if (create_form.getForm().isValid()) { handler: search_contents() } else { Ext.MessageBox.alert('状态', '不能为空的'); } } create_form.render(document.body); }); function search_contents(){ $(document).ready(function() { $.post('register.php',{ a: $("#account").val(), ... c: $("#cellphone").val()}, function(txt){ $('div.result').html(txt);}); }); } </script> </head> <body> <div id="create_form" ></div> <?php echo '$_POST[pass] = '.$_POST['pass'].'<br>'; if(strcmp($_POST['pass'], $_POST['pass_again']) == 0 && $_POST['pass'] != NULL) { $a = $_POST['account']; $p = $_POST['pass']; $pg = $_POST['pass_again']; $n = $_POST['name']; $i = $_POST['id']; $d = $_POST['date']; $c = $_POST['cellphone']; ...... echo '您的会员编号:'.$in.'<br>'; } else if(strcmp($_POST['pass'], $_POST['pass_again']) != 0 && $_POST['pass'] != NULL) { echo '帐号输入不一致<br>'; } ?> <br/>输入之文章: <div class="contents"></div> <br/>取代後之文章:<div class="result" id="result"></div><br/> <div class="contents"></div> <br/>取代後之文章:<div class="result" id="result"></div><br/> //********************************************************************// 我这样写跑起来没反应耶 是因为ajax 跟 jquery不相容吗? --



※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 203.64.183.226
1F:→ andreli:Ajax, jQuery分不清楚? 12/23 21:14
2F:推 Peruheru:ajax跟jQuery是不同层级的东西耶,javascript能写出ajax 12/24 03:48
3F:→ Peruheru:jQuery能写出ajax,prototype也能写出ajax,ajax只是一个 12/24 03:48
4F:→ Peruheru:"做法",就好像问"php跟echo会不会不相容"一样 12/24 03:49
5F:推 Peruheru:答案是"不会",因为jQuery也是写ajax时的一种选择 12/24 03:53
6F:→ Peruheru:ajax也是jquery的一部分 12/24 03:54
7F:→ Peruheru:你好像把Extjs当成ajax的同义词,拿来跟jquery比较了... 12/24 03:56
8F:推 Peruheru:好像又不是这样 12/24 05:18
9F:→ skywillnosky:好像有点懂了= ="... 12/24 08:24







like.gif 您可能会有兴趣的文章
icon.png[问题/行为] 猫晚上进房间会不会有憋尿问题
icon.pngRe: [闲聊] 选了错误的女孩成为魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一张
icon.png[心得] EMS高领长版毛衣.墨小楼MC1002
icon.png[分享] 丹龙隔热纸GE55+33+22
icon.png[问题] 清洗洗衣机
icon.png[寻物] 窗台下的空间
icon.png[闲聊] 双极の女神1 木魔爵
icon.png[售车] 新竹 1997 march 1297cc 白色 四门
icon.png[讨论] 能从照片感受到摄影者心情吗
icon.png[狂贺] 贺贺贺贺 贺!岛村卯月!总选举NO.1
icon.png[难过] 羡慕白皮肤的女生
icon.png阅读文章
icon.png[黑特]
icon.png[问题] SBK S1安装於安全帽位置
icon.png[分享] 旧woo100绝版开箱!!
icon.pngRe: [无言] 关於小包卫生纸
icon.png[开箱] E5-2683V3 RX480Strix 快睿C1 简单测试
icon.png[心得] 苍の海贼龙 地狱 执行者16PT
icon.png[售车] 1999年Virage iO 1.8EXi
icon.png[心得] 挑战33 LV10 狮子座pt solo
icon.png[闲聊] 手把手教你不被桶之新手主购教学
icon.png[分享] Civic Type R 量产版官方照无预警流出
icon.png[售车] Golf 4 2.0 银色 自排
icon.png[出售] Graco提篮汽座(有底座)2000元诚可议
icon.png[问题] 请问补牙材质掉了还能再补吗?(台中半年内
icon.png[问题] 44th 单曲 生写竟然都给重复的啊啊!
icon.png[心得] 华南红卡/icash 核卡
icon.png[问题] 拔牙矫正这样正常吗
icon.png[赠送] 老莫高业 初业 102年版
icon.png[情报] 三大行动支付 本季掀战火
icon.png[宝宝] 博客来Amos水蜡笔5/1特价五折
icon.pngRe: [心得] 新鲜人一些面试分享
icon.png[心得] 苍の海贼龙 地狱 麒麟25PT
icon.pngRe: [闲聊] (君の名は。雷慎入) 君名二创漫画翻译
icon.pngRe: [闲聊] OGN中场影片:失踪人口局 (英文字幕)
icon.png[问题] 台湾大哥大4G讯号差
icon.png[出售] [全国]全新千寻侘草LED灯, 水草

请输入看板名称,例如:BuyTogether站内搜寻

TOP