日期:2014-05-17  浏览次数:20594 次

JS小白求解为什么lable标签的值页面上没改变
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="js/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        function Regs() {
            var uName = document.getElementById("txtUserName").value;
            var uPwd = document.getElementById("txtPwd").value;
            var NameMeg = document.getElementById("LbNameMeg");
            var PwdMeg = document.getElementById("LPwdMeg");
            if (uName != "" && uPwd != "") {
                document.getElementById("LbNameMeg").display = "none";
                document.getElementById("LPwdMeg").display = "none";
            }
            else {
                if (uName == "") {
                    NameMeg.value = "*用户名不能为空!";
                    NameMeg.style.display = "block";
                } 
                 if (uPwd == "") {

                    PwdMeg.value = "*密码不能为空!";
                    PwdMeg.style.display = "block";
                }
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table>
            <tr>
                <td colspan="3">
                    <h2>