ecshop jquery 冲突

遇到冲突在脚本前面加上这句
$(function() {
window.__Object_toJSONString = Object.prototype.toJSONString;
delete Object.prototype.toJSONString;
});

ecshop 中的ajax使用

var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
$('#updateprice').click(function(){

    var obj = document.forms['theForm'];
    obj.value = Utils.trim(obj.elements['costs_price'].value);

    if (obj.value.length == 0) {
        alert('请输入结算价');
        return false;
    }
    if (!Utils.isNumber(obj.value)) {
        alert('结算价请输入数字');
        return false;
    }

    var orderid =obj.elements['orderid'].value;
    var supplierid = obj.elements['supplierlist'].value;
    var goodid = obj.elements['goodid'].value;
    var costs_price = obj.elements['costs_price'].value;

    Ajax.call('order.php?act=editordersupplier', 'orderid=' + orderid+'&supplierid='+supplierid+'&goodid='+goodid+'&costs_price='+costs_price, act_callback , 'POST', 'TEXT', true, true );

});

function act_callback(result){
    parent.location.reload();//刷新父页面
    parent.layer.close(index);//关闭子窗口
}
posted @ 2016-08-11 18:41  班哥静听  阅读(184)  评论(0编辑  收藏  举报