求救求救!!!

erldy 2006-11-16 08:25:53
代码如下:
function get_price(amount,price,rtype,total){
var queryString;
var type = document.getElementById(rtype).value;
var hid = document.getElementById('hid').value;
queryString = "type=" + type + "&hid=" + hid;
creatXMLHttpRequest();
xmlHttp.open("GET","bookhotel.php?action=GetPrice&"+queryString,"true");
xmlHttp.onreadystatechange = handleStateChange_Price(amount,price,total);
xmlHttp.send(null);
}
function handleStateChange_Price(amount,price,total) {
if(xmlHttp.readyState == 1) {
document.getElementById(price).style.cssText = "";
document.getElementById(price).innerText = "处理中……";
}
(这里开始,下面执行不了,怎么回事?浏览器提示错误信息:类型不匹配)
if(xmlHttp.readyState == 4) {
if(xmlHttp.status == 200) {

document.getElementById(price).style.cssText = "";
var allcon = xmlHttp.responseText;
document.getElementById(price).innerText = allcon;
var aValue = parseInt(document.getElementById(amount).value,10);
var bValue = parseInt(allcon,10);
document.getElementById(total).value = aValue * bValue;
}
}
}
...全文
177 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
frostm 2006-11-17
  • 打赏
  • 举报
回复
贴全部代码咯!

52,797

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Ajax
社区管理员
  • Ajax
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧