仿ppg放大镜效果特效代码

版权:原创 更新时间:1年以上
[该文章底部包含文件资源,可根据自己情况,决定是否下载资源使用,时间>金钱,如有需要,立即查看资源]

以下是 仿ppg放大镜效果特效代码 的示例演示效果:

当前平台(PC电脑)
  • 平台:

部分效果截图:

仿ppg放大镜效果特效代码

HTML代码(index.html):

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<script language=javascript src="js/global.js"></script>
<script language=javascript src="js/bp.js"></script>
<meta content="MSHTML 6.00.3790.4237" name=GENERATOR>
<meta name="keywords" content="JS代码,????Ч,JS广告代码,JS特效代码" />
<meta name="description" content="此代码内容为??ppg???Ч??,属于站长常用代码" />
<title>??ppg???Ч??</title>
</head>
<body>
<div class=imglist_right id=mpd>
<img onmousemove=javascript:slidebp(); id=mp 
style="cursor: pointer" onmouseout=javascript:closebp(); 
src="images/1_m.jpg" border=0></div>
<div id=bpd 
style="border: #cccccc 1px solid; display: none; overflow: hidden; width: 280px;position: absolute; height: 280px">
<div id=bpd2 style="position: absolute"><iframe 
style="z-index: -1; left: 2px; width: 1000px; position: absolute; top: 5px; height: 1000px" 
src="javascript:false" frameborder=0 scrolling=no></iframe><img id=bp 
src="images/1_b.jpg"> </div></div>
<div id=vpd 
style="border-right: #444444 1px solid; border-top: #444444 1px solid; display: none; overflow: hidden; border-left: #444444 1px solid; width: 90px; border-bottom: #444444 1px solid; position: absolute; height: 90px">
<div id=vpd2 style="position: absolute"><img onmousemove=javascript:slidebp(); 
id=vp style="cursor: pointer" onmouseout=javascript:closebp(); 
src="images/1_m.jpg"> </div></div>
<p>
  <script language=javascript>
gid = 37;
mp_pos = getAbsPoint(object("mpd"));
locateZoom();
</script>
</body></html>







JS代码(bp.js):

//大图浏览器var gp_cur = 1;
	var gid = 0;
	var zoom_m = 320;
	var zoom_w = 280;
	var zoom_x = 90;
	var zoom_b = 996;
	var zoom_x_h = zoom_x / 2;
	var mp_pos = null;
	function getAbsPoint(e){
	if (e == null){
	return;
}
var x = e.offsetLeft,y = e.offsetTop;
	while(e=e.offsetParent){
	x += e.offsetLeft;
	y += e.offsetTop;
}
x = x + 0;
	y = y + 0;
	return{
	"x":x,"y":y}
;
}
function locateZoom(){
	var zw = object("bpd");
	if (zw == null){
	return;
}
zw.style.left = mp_pos.x + zoom_m + 14 + "px";
	zw.style.top = mp_pos.y + 40 + "px";
}
function swap_zoom(cur){
	var mp = object("mp");
	var bp = object("bp");
	var vp = object("vp");
	if (mp == null || bp == null || vp == null){
	return;
}
mp.src = "/ngp/" + gid + "/" + cur + "_m.jpg";
	bp.src = "/ngp/" + gid + "/" + cur + "_b.jpg";
	vp.src = "/ngp/" + gid + "/" + cur + "_m.jpg";
	var spd = object("spd_" + cur);
	if (spd == null){
	return;
}
spd.style.borderColor = "#444444";
}
function change_zoom(cur){
	gp_cur = cur;
	var bpa = object("bpa");
	if (bpa == null){
	return;
}
bpa.href = "/ngp/" + gid + "/" + cur + "_b.jpg";
	var spd1 = object("spd_1");
	var spd2 = object("spd_2");
	var spd3 = object("spd_3");
	var spd4 = object("spd_4");
	if (spd1 == null || spd2 == null || spd3 == null || spd4 == null){
	return;
}
spd1.style.borderColor = "#CACACA";
	spd2.style.borderColor = "#CACACA";
	spd3.style.borderColor = "#CACACA";
	spd4.style.borderColor = "#CACACA";
	var spd = object("spd_" + cur);
	if (spd == null){
	return;
}
spd.style.borderColor = "#058EAE";
	return;
}
function swap_back(cur){
	var spd = object("spd_" + cur);
	if (spd == null){
	return;
}
spd.style.borderColor="#CACACA";
	if (cur == gp_cur){
	spd.style.borderColor="#058EAE";
	return;
}
var mp = object("mp");
	var bp = object("bp");
	var vp = object("vp");
	if (mp == null || bp == null){
	return;
}
mp.src = "/ngp/" + gid + "/" + gp_cur + "_m.jpg";
	bp.src = "/ngp/" + gid + "/" + gp_cur + "_b.jpg";
	vp.src = "/ngp/" + gid + "/" + gp_cur + "_m.jpg";
}
function slidebp(){
	var x = event.clientX- mp_pos.x+ document.documentElement.scrollLeft;
	var y = event.clientY- mp_pos.y+ document.documentElement.scrollTop;
	movebigpic(x,y);
	movediv(x,y);
	var mp = object("mp");
	var bpd = object("bpd");
	var vpd = object("vpd");
	if (mp == null || bpd == null || vpd == null){
	return;
}
mp.style.filter = "alpha(opacity=50)";
	bpd.style.display = "";
	vpd.style.display = "";
}
function closebp(){
	var mp = object("mp");
	var bpd = object("bpd");
	var vpd = object("vpd");
	if (mp == null || bpd == null || vpd == null){
	return;
}
mp.style.filter = "";
	bpd.style.display = "none";
	vpd.style.display = "none";
}
function movebigpic(x,y){
	var bpd = object("bpd2");
	if (bpd == null){
	return;
}
var xx = 0;
	var yy = 0;
	if (x < zoom_x_h){
	xx = 0;
}
else if (x > (zoom_m - zoom_x_h)){
	xx = zoom_w - zoom_b;
}
else{
	xx = (zoom_x_h - x) * (zoom_b - zoom_w) / (zoom_m - zoom_x);
}
if (y < zoom_x_h){
	yy = 0;
}
else if (y > (zoom_m - zoom_x_h)){
	yy = zoom_w - zoom_b;
}
else{
	yy = (zoom_x_h - y) * (zoom_b - zoom_w) / (zoom_m - zoom_x);
}
bpd.style.left = xx + "px";
	bpd.style.top = yy + "px";
}
function movediv(x,y){
	var vpd = object("vpd");
	if (vpd == null){
	return;
}
var xx = 0;
	var yy = 0;
	if (x < zoom_x_h){
	xx = 0;
}
else if (x > (zoom_m - zoom_x_h)){
	xx = zoom_m - zoom_x;
}
else{
	xx = x - zoom_x_h;
}
if (y < zoom_x_h){
	yy = 0;
}
else if (y > (zoom_m - zoom_x_h)){
	yy = zoom_m - zoom_x;
}
else{
	yy = y - zoom_x_h;
}
vpd.style.left = (xx + mp_pos.x) + "px";
	vpd.style.top = (yy + mp_pos.y) + "px";
	movesmallpic(xx,yy);
}
function movesmallpic(x,y){
	var vp = object("vpd2");
	if (vp == null){
	return;
}
var xx = 0 - x;
	var yy = 0 - y;
	vp.style.left = xx + "px";
	vp.style.top = yy + "px";
}

JS代码(global.js):

if (typeof(webroot) == 'undefined'){
	var webroot = "/hany/";
}
var xmlhttp = null;
	var BrowerType = 'IE';
	if(window.XMLHttpRequest){
	xmlhttp = new XMLHttpRequest();
	var BrowerType = 'FF';
}
else if(window.ActiveXObject){
	var msxml = new Array('MSXML2.XMLHTTP.5.0','MSXML2.XMLHTTP.4.0','MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP','Microsoft.XMLHTTP');
	for(var i=0;
	i<msxml.length;
	i++){
	try{
	xmlhttp = new ActiveXObject(msxml[i]);
	break;
}
catch(e){
}
}
}
function checkform(obj){
	var errmsg = object('errormessage');
	if (errmsg!=null)errmsg.innerHTML = '';
	for (i=0;
	i<obj.length;
	i++){
	var cn = obj[i];
	if (cn.className == 'errbox'){
	cn.className = 'needbox';
}
if (cn.className == 'needbox' && cn.value == ''){
	cn.className = 'errbox';
	cn.focus();
	if (cn.getAttribute('hint') != null){
	if (errmsg!=null)errmsg.innerHTML = cn.getAttribute('hint');
	else alert(cn.getAttribute('hint'));
}
return false;
}
if (cn.getAttribute('match') != null){
	var m = cn.getAttribute('match');
	var r = new RegExp(m);
	if (!r.test(cn.value)){
	cn.className = 'errbox';
	cn.focus();
	if (cn.getAttribute('hint') != null){
	if (errmsg!=null)errmsg.innerHTML = cn.getAttribute('hint');
	else alert(cn.getAttribute('hint'));
}
return false;
}
}
}
return true;
}
function checkradio(radioname,message){
	var errmsg = object('errormessage');
	if (errmsg!=null)errmsg.innerHTML = '';
	var hascheck;
	hascheck = false;
	var rn = document.getElementsByName(radioname);
	for (var i=0;
	i<rn.length;
	i++){
	if (rn[i].checked){
	hascheck = true;
	break;
}
}
if (!hascheck){
	if (errmsg!=null)errmsg.innerHTML = message;
	else alert(message);
	return false;
}
return true;
}
function object(objId){
	return document.getElementById(objId);
}
function message(msg,url){
	if (url!=''){
	if (confirm(msg)){
	window.location.href=url;
}
else{
	return false;
}
}
else{
	alert(msg);
}
}
function _location(url){
	window.location.href=url;
}
function addHandleEvent(obj,type,func){
	if (obj.attachEvent){
	obj.attachEvent('on'+type,func);
	return true;
}
else if (obj.addEventListener){
	obj.addEventListener(type,func,false);
	return true;
}
else{
	return false;
}
}
function button(obj){
}
/* cookie class */
function cookie(){
	if (document.cookie.length){
	this.cookies = ' ' + document.cookie;
}
}
cookie.prototype.set = function (key,value){
	var expdate = new Date();
	var argv = this.set.arguments;
	var argc = this.set.arguments.length;
	var expires = (argc > 2) ? argv[2]:null;
	var path = (argc > 3) ? argv[3]:null;
	var domain = (argc > 4) ? argv[4]:null;
	var secure = (argc > 5) ? argv[5]:false;
	if(expires!=null) expdate.setTime(expdate.getTime() + ( expires * 1000 ));
	document.cookie = key + "=" + escape (value) +((expires == null) ? "":(";
	expires="+ expdate.toGMTString())) +((path == null) ? "":(";
	path=" + path)) +((domain == null) ? "":(";
	domain=" + domain)) +((secure == true) ? ";
	secure":"");
}
cookie.prototype.get = function (key){
	if (this.cookies){
	var start = this.cookies.indexOf(' ' + key + '=');
	if (start == -1){
	return null;
}
var end = this.cookies.indexOf(";
	",start);
	if (end == -1){
	end = this.cookies.length;
}
end -= start;
	var cookie = this.cookies.substr(start,end);
	return unescape(cookie.substr(cookie.indexOf('=') + 1,cookie.length - cookie.indexOf('=') + 1));
}
else{
	return null;
}
}
cookie.prototype.remove = function (key){
	var expdate = new Date();
	expdate.setTime (expdate.getTime() - 1);
	var cval = this.get(key);
	document.cookie = key + "=" + cval + ";
	expires="+ expdate.toGMTString();
}
/* car class */
function car(){
}
car.prototype.add = function(goodsid,modelid,nums){
	var rnd = new Date().getTime();
	var url = webroot+'setcookie.php?rnd='+rnd+'&goodsid='+goodsid+'&modelid='+ EncodeUtf8(modelid)+'&nums='+nums;
	xmlhttp.open('GET',url,false);
	xmlhttp.send(null);
	var text = xmlhttp.responseText;
	if(text=='true'){
	if(confirm('现在去结算中心吗?\n\n如要去结算中心点击“确定”,继续购物点击“取消”。')){
	window.location.href=webroot+'shopping.step.php';
}
}
if(text=='exist'){
	alert('对不起!您的购物车中已经有相同的商品。');
}
if(text=='login'){
	alert('挑选积分兑换礼品请先登录');
}
if(text=="point"){
	if ( nums > 1){
	alert('您的积分不够兑换这些商品');
}
else{
	alert('您的积分不够兑换此商品');
}
}
if (text=="false"){
	alert('页面错误');
}
}
car.prototype.clear = function(){
	var rnd = new Date().getTime();
	var url = webroot+'setcookie.php?rnd='+rnd+'&action=clear';
	xmlhttp.open('GET',url,false);
	xmlhttp.send(null);
}
car.prototype.remove = function(modelid,goodsid){
	if (confirm('确定删除该商品吗?')){
	var rnd = new Date().getTime();
	var url = webroot+'setcookie.php?rnd='+rnd+'&action=remove&modelid='+EncodeUtf8(modelid)+'&goodsid='+goodsid;
	xmlhttp.open('GET',url,false);
	xmlhttp.send(null);
	var text = xmlhttp.responseText;
	if(text=='true'){
	//window.location.href=webroot+'shopping.step.php';
	object("shopping_form").submit();
}
if(text=='exist'){
	alert('删除商品出错');
}
}
}
var car = new car();
	function add_goods(){
	var gs = object("modelid");
	if (gs == null){
	alert("页面错误");
	return;
}
if (gs.selectedIndex == 0){
	alert("请选择尺寸");
	return;
}
car.add(object('goodsid').value,object('modelid').value,object('nums').value);
}
var fade_header_arr = new Array('品味,触手可及','快乐,随身出发');
	var fade_header_cur = 0;
	var colorIn='#006378';
	// 淡入颜色var colorOut='#FFFFFF';
	// 淡出颜色var dur=100;
	// 淡入淡出步数function fade_header(){
	fade_header_cur++;
	if (fade_header_cur >= fade_header_arr.length){
	fade_header_cur = 0;
}
var fade_header_div = object("header_fade");
	fade_header_div.style.color= "#FFFFFF";
	fade_header_div.innerHTML = fade_header_arr[fade_header_cur];
	fade("header_fade",colorIn,colorOut,dur,false);
	//changebigpic();
	setTimeout("fade_header()",8000);
}
// 淡入淡出函数function fade(id,colorSource,colorFade,fadeStep,background){
	var element = document.getElementById(id);
	// 分解源色彩var rSource = sprRGB(colorSource,0);
	//红 Rvar bSource = sprRGB(colorSource,1);
	//绿 Gvar gSource = sprRGB(colorSource,2);
	//蓝 B// 分解渐变色彩var rFade = sprRGB(colorFade,0);
	var bFade = sprRGB(colorFade,1);
	var gFade = sprRGB(colorFade,2);
	// 步数统计var step = 0;
	// 设置定时器var fadeTimer = setInterval(function(){
	var tmpStep = fadeStep - step;
	// 由于 floor() 计算不准确,当达到指定步数后直接赋值源色彩if(step < fadeStep){
	with(Math){
	var rStep = floor((rSource - rFade) / tmpStep);
	var gStep = floor((gSource - gFade) / tmpStep);
	var bStep = floor((bSource - bFade) / tmpStep);
}
rFade += rStep;
	gFade += gStep;
	bFade += bStep;
	if(background){
	element.style.backgroundColor = 'rgb('+rFade+','+bFade+','+gFade+')';
}
else{
	element.style.color = 'rgb('+rFade+','+bFade+','+gFade+')';
}
}
else{
	if(background){
	element.style.backgroundColor = colorSource;
}
else{
	element.style.color = colorSource;
}
// 清除定时器clearInterval(fadeTimer);
}
step ++;
}
,20);
}
// 分离RGB颜色 0:R | 1:G | 2:Bfunction sprRGB(color,type){
	var start,len,result;
	len = (color.length == 4)?1:2;
	start = type * len + 1;
	result = color.substr(start,len);
	if(result.length == 1){
	result += result;
}
return parseInt(result,16);
}
//出处:网上搜集//made by yaosansi 2005-12-02//For more visit http://www.yaosansi.com// Trim(),Ltrim(),RTrim()String.prototype.Trim = function(){
	return this.replace(/(^\s*)|(\s*$)/g,"");
}
String.prototype.LTrim = function(){
	return this.replace(/(^\s*)/g,"");
}
String.prototype.RTrim = function(){
	return this.replace(/(\s*$)/g,"");
}
function go_check(){
	var gto = object("goods_total");
	if (gto == null){
	alert("页面错误");
	window.location.reload();
	return;
}
var gt = gto.innerHTML;
	if (gt != parseInt(gt)){
	alert("页面错误");
	window.location.reload();
	return;
}
if (gt == 0){
	alert("您没有选择商品");
	return;
}
window.location.href = "profile.order.php";
}
var bigpic_cur = 0;
	function changebigpic(){
	var bp = object("bigpic");
	if (bp == null){
	return;
}
bigpic_cur++;
	if (bigpic_cur >= bigpic_arr.length){
	bigpic_cur = 0;
}
bp.innerHTML = bigpic_arr[bigpic_cur];
}
function viewbigpic(fileurl){
	var retbigpic = window.showModelessDialog(fileurl,"ddd","scroll:no;
	dialogTop:20;
	dialogLeft:20;
	dialogHeight:800px;
	dialogWidth:800px;
	status:no;
	help:no");
}
function check_address(f){
	if (f == null){
	return false;
}
f.consignee.value = f.consignee.value.Trim();
	if (f.consignee.value == ""){
	alert("请输入收货人信息");
	f.consignee.focus();
	return false;
}
f.email.value = f.email.value.Trim();
	if (f.email.value == ""){
	alert("请输入正确的email信息");
	f.email.focus();
	return false;
}
//var myReg = /^[a-z]([a-z0-9]*[-_]?[a-z0-9]+)*@([a-z0-9]*[-_]?[a-z0-9]+)+[\.][a-z]{
	2,3}
([\.][a-z]{
	2}
)?$/i;
	//var myReg = /^[a-z0-9._%-]+@[a-z0-9._%-]+\.[a-z]{
	2,4}
$///if(!/(\S)+[@]{
	1}
(\S)+[.]{
	1}
(\w)+/.test(f.email.value))//if( myReg.test(f.email.value) == false)//{
	//alert("请输入正确的email信息");
	//email.focus();
	//return false;
	//}
if (f.province.selectedIndex == 0 || f.city.selectedIndex == 0){
	alert("请选择地址");
	return false;
}
f.address.value = f.address.value.Trim();
	if (f.address.value == ""){
	alert("请输入详细地址");
	f.address.focus();
	return false;
}
f.zipcode.value = f.zipcode.value.Trim();
	//if (f.zipcode.value == "")//{
	//alert("请输入邮编");
	//f.zipcode.focus();
	//return false;
	//}
f.phone.value = f.phone.value.Trim();
	f.mobile.value = f.mobile.value.Trim();
	if (f.mobile.value == ""){
	alert("请输入手机号码");
	f.mobile.focus();
	return false;
}
f.signbuilding.value = f.signbuilding.value.Trim();
	f.besttime.value = f.besttime.value.Trim();
	return true;
}
function checklogin(){
	var errinfo = object("err_info");
	errinfo.innerHTML = "";
	var uname = object("i_username");
	uname.value = uname.value.Trim();
	if (uname.value == ""){
	errinfo.innerHTML = "请输入用户名";
	return false;
}
var aspam = object("i_antispamex");
	aspam.value = aspam.value.Trim();
	if (aspam.value == "" || aspam.value.length != 4){
	errinfo.innerHTML = "请输入正确的验证码";
	return false;
}
return true;
}
function check_register(f){
	if (f == null){
	return false;
}
errinfo = object("err_info");
	errinfo.innerHTML = "";
	f.username.value = f.username.value.Trim();
	if (f.username.value == ""){
	errinfo.innerHTML = "请输入用户名";
	f.username.focus();
	return false;
}
f.email.value = f.email.value.Trim();
	if (f.email.value == ""){
	errinfo.innerHTML = "请输入正确的email信息";
	f.email.focus();
	return false;
}
//var myReg = /^[a-z]([a-z0-9]*[-_]?[a-z0-9]+)*@([a-z0-9]*[-_]?[a-z0-9]+)+[\.][a-z]{
	2,3}
([\.][a-z]{
	2}
)?$/i;
	//var myReg = /^[a-z0-9._%-]+@[a-z0-9._%-]+\.[a-z]{
	2,4}
$///if(!/(\S)+[@]{
	1}
(\S)+[.]{
	1}
(\w)+/.test(f.email.value))//if( myReg.test(f.email.value) == false)//{
	//alert("请输入正确的email信息");
	//email.focus();
	//return false;
	//}
//if (!(f.province.selectedIndex > -1 && f.city.selectedIndex > -1))//{
	//alert("请选择地址");
	//return false;
	//}
if (f.password.value == "" || f.password.value != f.confpass.value){
	errinfo.innerHTML = "请输入正确的密码";
	f.password.focus();
	return false;
}
f.antispamex.value = f.antispamex.value.Trim();
	if (f.antispamex.value == "" || f.antispamex.value.length != 4){
	errinfo.innerHTML = "请输入正确的验证码";
	f.antispamex.focus();
	return false;
}
return true;
}
function check_profile(f){
	if (f == null){
	return false;
}
errinfo = object("err_info");
	errinfo.innerHTML = "";
	f.email.value = f.email.value.Trim();
	if (f.email.value == ""){
	errinfo.innerHTML = "请输入正确的email信息";
	f.email.focus();
	return false;
}
if (f.password.value != ""){
	if (f.oldpass.value == ""){
	errinfo.innerHTML = "请输入正确的旧密码";
	f.oldpass.focus();
	return false;
}
if (f.password.value != f.confpass.value){
	errinfo.innerHTML = "请输入正确的新密码";
	f.password.focus();
	return false;
}
}
f.antispamex.value = f.antispamex.value.Trim();
	if (f.antispamex.value == "" || f.antispamex.value.length != 4){
	errinfo.innerHTML = "请输入正确的验证码";
	f.antispamex.focus();
	return false;
}
return true;
}
function check_profile_password(f){
	if (f == null){
	return false;
}
errinfo = object("err_info");
	errinfo.innerHTML = " ";
	f.username.value = f.username.value.Trim();
	f.email.value = f.email.value.Trim();
	if (f.username.value == "" && f.email.value == ""){
	errinfo.innerHTML = "请输入注册时的用户名或电子邮件";
	f.email.focus();
	return false;
}
f.antispamex.value = f.antispamex.value.Trim();
	if (f.antispamex.value == "" || f.antispamex.value.length != 4){
	errinfo.innerHTML = "请输入正确的验证码";
	f.antispamex.focus();
	return false;
}
return true;
}
function check_giftcard(f){
	if (f == null){
	return false;
}
errinfo = object("err_info");
	errinfo.innerHTML = "";
	f.hash.value = f.hash.value.Trim();
	if (f.hash.value == "" || f.hash.value.length != 12){
	errinfo.innerHTML = "请输入正确的礼品卡验证码";
	f.hash.focus();
	return false;
}
f.antispamex.value = f.antispamex.value.Trim();
	if (f.antispamex.value == "" || f.antispamex.value.length != 4){
	errinfo.innerHTML = "请输入正确的图片验证码";
	f.antispamex.focus();
	return false;
}
return true;
}
function getAbsPoint(e){
	if (e == null){
	return;
}
var x = e.offsetLeft,y = e.offsetTop;
	while(e=e.offsetParent){
	x += e.offsetLeft;
	y += e.offsetTop;
}
x = x + 2;
	y = y + 2;
	return{
	"x":x,"y":y}
;
}
function do_echo(){
	if (xmlhttp.readyState == 4){
	if (xmlhttp.status == 200){
	if (xmlhttp.responseText != ""){
	alert(xmlhttp.responseText);
}
}
}
}
function do_echo_reload(){
	if (xmlhttp.readyState == 4){
	if (xmlhttp.status == 200){
	if (xmlhttp.responseText == ""){
	// maybe errorlocation.reload();
}
else{
	var ret = xmlhttp.responseText;
	ret_arr = ret.split("|");
	if (ret_arr[0] == 0){
	//do nothingreturn;
}
else if (ret_arr[0] == 1){
	// do not reloadalert(ret_arr[1]);
	return;
}
else if (ret_arr[0] == 2){
	// alert and reloadalert(ret_arr[1]);
	location.reload();
	return;
}
else{
	// reload onlylocation.reload();
	return;
}
}
}
}
}
String.prototype.trim=function(){
	return this.replace(/(^\s*)|(\s*$)/g,"");
}
String.prototype.ltrim=function(){
	return this.replace(/(^\s*)/g,"");
}
String.prototype.rtrim=function(){
	return this.replace(/(\s*$)/g,"");
}
function select_init(select,init_str){
	var s = document.getElementById(select);
	s.selectedIndex = 0;
	for (i = 0;
	i < s.options.length;
	i++){
	if (s.options[i].value == init_str){
	s.selectedIndex = i;
}
}
}
function check_init(check,init_str){
	var cs = document.getElementsByName(check);
	var cl = cs.length;
	for (var i = 0;
	i < cl;
	i++){
	cs[i].checked = false;
}
if (init_str == ""){
	return;
}
var ia = init_str.split(",");
	var il = ia.length;
	for (var i = 0;
	i < il;
	i++){
	for (var j = 0;
	j < cl;
	j++){
	if (ia[i] == cs[j].value){
	cs[j].checked = true}
}
}
}
function shopping_pre_step(){
	var step = object("step");
	step.value = parseInt(step.value) - 1;
	var f = object("shopping_form");
	f.submit();
}
function shopping_next_step(){
	var f = object("shopping_form");
	var step = object("step");
	var v = step.value;
	if (v == 2){
	// 验证地址if (check_address(f) == false){
	return;
}
}
else if (v == 4){
	if (checkradio("paymentid","请选择支付方式") == false){
	return;
}
}
step.value = parseInt(step.value) + 1;
	f.submit();
}
function shopping_save_car(){
	var f = object("shopping_form");
	f.submit();
}
function shopping_check_step(){
	var gpo = object("igp_total");
	if (gpo == null){
	alert("参数错误");
	location.reload();
}
if (gpo.innerHTML == 0){
	var bo = object("ibonus_total");
	if (bo == null || bo.innerHTML == 0){
	alert("您没有选择商品");
}
else{
	if (confirm("单独兑换礼品,您还需要另付运费")){
	shopping_next_step();
}
}
}
else{
	shopping_next_step();
}
}
附件:下载该文件资源,减少时间成本(增值服务)
留言
该资源可下载
File Source
.rar
334.26 KB
最新结算
股权转让协议意向书模板
类型: .docx 金额: CNY 2.23¥ 状态: 待结算 详细>
股权转让协议意向书模板
类型: .docx 金额: CNY 0.28¥ 状态: 待结算 详细>
CSS3图片向上3D翻转渐隐消失特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
CSS3图片向上3D翻转渐隐消失特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
.net c# 将金额转人名币大写金额
类型: .rar 金额: CNY 2.39¥ 状态: 待结算 详细>
.net c# 将金额转人名币大写金额
类型: .rar 金额: CNY 0.3¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 2.23¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 0.28¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 2.23¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 0.28¥ 状态: 待结算 详细>
我们力求给您提供有用的文章,再此基础上,会附加营收资源,不做任何广告,让平台可以更好发展 若您发现您的权利被侵害,或使用了您的版权,请发邮件联系 sunlifel@foxmail.com ggbig觉得 : 不提供源码的文章不是好文章
合作伙伴
联系我们
  • QQ:21499807
  • 邮箱:sunlifel@foxmail.com
  • QQ扫一扫加QQ
    QQ扫一扫
Copyright 2023-2024 ggbig.com·皖ICP备2023004211号-1
打赏文章