登录页面增加“免费试玩”、“立即注册”

//免费试玩按钮
function try_play(){
	$.ajax({
		url: "/Login/guestlogin",
		dataType: "json",
		success: function (json) {
			if (json.tips=="") {
				alert("试玩登录成功,即将跳转");
				location.href = "/LobbyOp";
			} else {
				alert(json.tips);
			}
		},
		error: function () {
			alert("网络异常,请刷新页面");
		}
	});
};

		
		

<li class="loginbtn">
	<input type="button" class="loginarea_btn" value="返回" onclick="location.href='/';" />
</li>
<li style="width: 147px;height: 44px;float:left;line-height:44px;text-align:left;background:#1F0A02;border: 0px solid #d4d1cc;font-size:13px;">
	<a href="/Register/index/">立即注册</a>
</li>
<li style="width: 147px;height: 44px;float:left;line-height:44px;text-align:right;background:#1F0A02;border: 0px solid #d4d1cc;font-size:13px;">
	<a href="#" onclick="javascript:try_play();">免费试玩</a>
</li>

 

posted @ 2017-05-14 18:47  百草之家  阅读(328)  评论(0编辑  收藏  举报