JS代码是:
<script language="javascript" type="text/javascript"><!--//
var selected;
var submitter = null;function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=450,height=320,screenX=150,screenY=150,top=150,left=150')
}
function couponpopupWindow(url) {
  window.open(url,'couponpopupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=450,height=320,screenX=150,screenY=150,top=150,left=150')
}
function submitFunction(jQuerygv,jQuerytotal) {
  if (jQuerygv >=jQuerytotal) {
    submitter = 1;
  }
  jQuery('div#checkout form').attr({
    name: 'checkout_payment',
    onsubmit: 'return true;',
    action: 'http://cnobd.lzm/index.php?main_page=fec_confirmation&amp;fecaction=process'
  }); 
}function methodSelect(theMethod) {
  if (document.getElementById(theMethod)) {
    document.getElementById(theMethod).checked = 'checked';
  }
}function updateForm() {
  jQuery('div#checkout form').attr({
    name: 'checkout_payment',
    onsubmit: 'return true;',
    action: 'index.php?main_page=checkout&fecaction=update'
  });
  jQuery('div#checkout form').submit(); 
}
//--></script>
在ID和NAME都为'checkout_payment'的表单中,想实现点击单选框,在本页提交不同的值并加以运算,RADIO的代码是:
<input type="radio" id="ship-flat-flat" onclick="updateForm();" checked="checked" value="flat_flat" name="shipping">
<input type="radio" id="ship-item-item" onclick="updateForm();" value="item_item" name="shipping">
在IE8和火狐下都可以正常的运行,可在IE7和IE6点击单选框就出现“对象不支持此属性和方法”的提示错误,并且也没有提交值。我对JS很菜,请高手们多多指教,帮助,小弟在此先谢谢了!!

解决方案 »

  1.   

    感谢thc1987的回复,具体的程序测试可以访问:http://www.numinix.com/development/fec/,在支付页面选择配送方式的时候出现的问题
      

  2.   

    JQ是兼容FF和IE的,而且在IE8下正常,问题出在哪里现弄不清了
      

  3.   

    我以前遇到过类似的问题,问题不在于JS,因为火狐是标准的浏览器,只要火狐不报错就是正确的,应该是里面的头文件,传输标准协议没加上去导致的
    比如
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    当然你再对比哈其他页面有没有缺少啥子东西
      

  4.   

    我查看了文件头,是按照标准协议传输的:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
      

  5.   

    你确定在FF的工具栏下WEB控制台没报错?
      

  6.   

    在IE6下,如果jquery事件是通过点击触发的,最好在事件结尾都加上return false;
      

  7.   

    这个问题很正常
    IE8的兼容性比IE7IE6提高很多 你用的是JS的还不是全部是jquery的所以你的兼容性存在问题很正常你全部改成jqeury的就正常了
    jquery的兼容性不是什么问题
      

  8.   

    我对JS方面是个菜鸟,还希望哪位能详细指教一下,本人愿意付费解决,QQ:89133605,比较着急。
      

  9.   

    to ma1986:在FF控制台上确实有警告提示,提示:解析"height"的值时出错,声明被丢弃。但JS可以正常执行,JS代码因为太长,没法粘贴在这里,麻烦各位访问http://www.numinix.com/development/fec/,在支付页面选择配送方式的时候出现的。
      

  10.   

    应该是jquery-1.6.1.min.js这个文件出错导致的