添加js方法

This commit is contained in:
guange 2016-01-20 22:14:47 +08:00
parent 27c2e9eddc
commit 55b61e9e90
2 changed files with 20 additions and 7 deletions

View File

@ -5,6 +5,15 @@
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<title>绑定用户</title>
<link rel="stylesheet" href="/stylesheets/weui/weui.min.css"/>
<script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js" />
<script type="text/javascript">
function close(){
wx.closeWindow();
}
</script>
</head>
<body>
@ -17,13 +26,10 @@
</div>
<div class="weui_opr_area">
<p class="weui_btn_area">
<a href="javascript:;" class="weui_btn weui_btn_primary">确定</a>
<a href="javascript:;" class="weui_btn weui_btn_default">取消</a>
<a href="javascript:close();" class="weui_btn weui_btn_primary">确定</a>
</p>
</div>
<div class="weui_extra_area">
<a href="">查看详情</a>
</div>
</div>
</div>

View File

@ -5,11 +5,18 @@
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<title>绑定用户</title>
<link rel="stylesheet" href="/stylesheets/weui/weui.min.css"/>
<script type="text/javascript">
function formSubmit()
{
document.getElementById("main_login_form").submit()
}
</script>
</head>
<div class="loginIn">
<div>
<p class="wechat-error">
<p class="weui_cells_title wechat-error">
<%= @wechat_bind_errors %>
</p>
</div>
@ -34,7 +41,7 @@
<input type="hidden" value="<%=@openid%>" name="openid">
<div class="weui_btn_area">
<a class="weui_btn weui_btn_primary" href="javascript:" id="showTooltips">确定</a>
<a class="weui_btn weui_btn_primary" href="javascript:formSubmit();" id="showTooltips">确定</a>
</div>
</div>