代码
$.extend($.validator.messages, { required: "This field is required.", remote: "Please fix this field.", email: "Please enter a valid email address.", url: "Please enter a valid URL.", date: "Please enter a valid date.", dateISO: "Please enter a valid date ( ISO ).", number: "Please enter a valid number.", digits: "Please enter only digits.", creditcard: "Please enter a valid credit card number.", equalTo: "Please enter the same value again.", maxlength: $.validator.format("Please enter no more than {0} characters."), minlength: $.validator.format("Please enter at least {0} characters."), rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."), range: $.validator.format("Please enter a value between {0} and {1}."), max: $.validator.format("Please enter a value less than or equal to {0}."), min: $.validator.format("Please enter a value greater than or equal to {0}.") });
删除百分号
$oct.DelLastChar(${cartitem.saveoff},"%")
表单提交
$("form[name='loginForm']").ajaxForm({ success: function (data) { if (data && data.length > 0) { var i = data.lastIndexOf(">"); if (i != -1) { $("#divLogin").html(data.substring(0, i + 1)); } } } });
function ChkLogin() { var bl = lForm.form(); if (bl) { $("form[name='loginForm']").ajaxSubmit({ success: function (data) { if (data && data.length > 0) { var i = data.lastIndexOf(">"); if (i != -1) { $("#divLogin").html(data.substring(0, i + 1)); } } } }); } }
Meta
<meta name="author" content="The Octopus; Team and others" />
<meta name="generator" content="shopping cart program by Octopus;, http://www.octopus-cart.com eCommerce" />
$(".stepbutton_block_5").click(function () { //var o = v3.form(); //var bl; //$("input[name='rad_payment_method']").each(function () { // if ($(this).attr("checked") == "checked") { // bl = true; // } //}); //if (bl) { // if (o) { // //_self = this; // //openNextBlock(_self); // CreateOrder(); // } //} //else { // alert(ocConfig.youChoosePayment); //} if (v3.form()) { CreateOrder(); } });
//$(".stepbutton_block_3").click(function () { // acheckout = false; // if (v2.form()) { // acheckout = true; // } // if (acheckout) { // _self = this; // openNextBlock(_self); // } //});
//v1.form()&&v2.form() 从左向右执行 第一个不通过第二个就不执行了
$(document).ready(function () { $('#addtocart').poshytip({ content: 'Hey, there! This is a tooltip.', showOn: 'none', alignTo: 'target', alignX: 'inner-left', offsetX: 0, offsetY: 5 }); $(".attr_radio span,.attr_color_radio span").click(function () { //$(".attr_radio span").removeClass("checked"); $(this).parent().children("span").removeClass("checked"); $(this).toggleClass("checked"); //$(".attr_radio input[type=hidden]").val($(this).attr("data-val")); $(this).parent().children("input[type=hidden]").val($(this).attr("data-val")); attr_s.push($(this).parent().children("input[type=hidden]").get(0).name.replace(/attr_/, "")); count++; //alert(count); //alert(attr_s.unique3()); $("#addtocart").poshytip('hide'); }); });
<div class="item" style="position:relative"> <span class="required" style="float:left;display:block;width:5px;height:26px; margin:0px 3px;">*</span> <input style="float:left;display:block;width:13px;height:26px" type="checkbox" name="register_privacy_conditions" value="1" /> <div style="float:left"> I agree to XXX.com Terms and Conditions. </div> </div>