登录注册页面切换

<a href="javascript:void(0);" onclick="getContentHtml();" >登录可见</a>
 1 function getContentHtml() {
 2     var username = $("#username").val();
 3     if (username == "" || username == null) {
 4         alert("您还没有登陆!");
 5         window.location.href ='login.htm';
 6     } else {
 7         window.location.href = 'content.htm';
 8 
 9     }
10 }

 

posted @ 2015-05-05 10:05  peng2015  阅读(495)  评论(0编辑  收藏  举报