标签:cli else window index rdl ajax 事件 加载 eva
<script type="text/javascript"> //页面加载后 $(function() { //给验证码图片添加点击事件 $("#verId,#verId2").click(function() { //让img的src属性重新赋值为image.jsp $("#verId").attr("src", "image.jsp?date=" + new Date()); }) }) function login() { //获取用户输入数据 var unameval = $("#unameid").val(); var pwdval = $("#pwdid").val(); var verifycodeval = $("#verifycodeid").val(); $.ajax({ url : "user.action", type : "post", data : { cmd : "login", username : unameval, password : pwdval, verifycode : verifycodeval }, dataType : "json", success : function(data) { if (data.msgId == 1) { window.location.href = "index.jsp"; } else if (data.msgId == 2) { $("#passwordlabelid").html(data.msgContent); } else if (data.msgId == 3) { $("#verifycodelabelid").html(data.msgContent); } } }) } </script>
标签:cli else window index rdl ajax 事件 加载 eva
原文地址:https://www.cnblogs.com/cqming/p/10890587.html