var RefreshTool = function(arg, tel, code) { //页面图片控制这里可以加参数
_("#Last").attr("tel", "");
_("#Last").attr("code", "");
if (arg == 1) {
_("#Setp1").css("background", "url('Context/images/password/u6.png')")
_("#Setp2").css("background", "url('Context/images/password/u36.png')")
_("#Setp3").css("background", "url('Context/images/password/u0.png')")
_("#Setp1 img").attr("src", "Context/images/password/u4.png")
_("#Setp2 img").attr("src", "Context/images/password/u4.png")
_("#Setp3 img").attr("src", "Context/images/password/u44.png")
_("#Last").hide();
_("#First").show();
} else if (arg == 2) {
_("#Setp1").css("background", "url('Context/images/password/u36.png')")
_("#Setp2").css("background", "url('Context/images/password/u6.png')")
_("#Setp3").css("background", "url('Context/images/password/u0.png')")
_("#Setp1 img").attr("src", "Context/images/password/u44.png")
_("#Setp2 img").attr("src", "Context/images/password/u44.png")
_("#Setp3 img").attr("src", "Context/images/password/u4.png")
_("#First").hide();
} else {
_("#Setp1").css("background", "url('Context/images/password/u0.png')")
_("#Setp2").css("background", "url('Context/images/password/u36.png')")
_("#Setp3").css("background", "url('Context/images/password/u6.png')")
_("#Setp1 img").attr("src", "Context/images/password/u8.png")
_("#Setp2 img").attr("src", "Context/images/password/u8.png")
_("#Setp3 img").attr("src", "Context/images/password/u44.png")
_("#Email").hide();
_("#Phone").hide();
_("#Last").attr("tel", tel);
_("#Last").attr("code", code);
_("#Last").show();
}
};
1.这里定义两个参数 tel和code
_("#Last").attr("tel", "");
_("#Last").attr("code", "");
_("#Last").attr("tel", tel);
_("#Last").attr("code", code);
在客户端的js
调用这个函数把参数传过去
方法1:{
RefreshTool(3, tel, code);
}
在这个方法2中接收传过来的参数
方法2:{
tel:_(#Last).attr("tel"),
code:_(#Last).attr("code"),
}
测试是否传到值
console.log(e.params.tel);
console.log(e.params.code);