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&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很菜,请高手们多多指教,帮助,小弟在此先谢谢了!!
<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&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很菜,请高手们多多指教,帮助,小弟在此先谢谢了!!
比如
<!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">
当然你再对比哈其他页面有没有缺少啥子东西
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
IE8的兼容性比IE7IE6提高很多 你用的是JS的还不是全部是jquery的所以你的兼容性存在问题很正常你全部改成jqeury的就正常了
jquery的兼容性不是什么问题