1. 直接跳转到地址填写页面 window.location.href='<?php echo $currenturl. "/address/addedit";?>'; 2. 直接滑动到顶部填写地址的地方 jQuery('body').animate( {scrollTop: 0}, 500); 3. 跳出提示信息 showTips("<?php echo ltext('Please Enter Your Address') ?>"); function placeorder() { if(jQuery(".defaultaddress").val() == 0){ //还没有设置地址,直接进入地址页面 jQuery('body').animate( {scrollTop: 0}, 500); window.location.href='<?php echo $currenturl. "/address/addedit";?>'; showTips("<?php echo ltext('Please Enter Your Address') ?>"); return; }
...
}