实验报告加源码 程序代码如下: Private Sub cmdok_Click() '检查正确的密码 '首先要对用户名特殊字符的过滤 '防止非授权用户的登陆访问 Dim s1 As String Dim i As Integer Dim j As Integer Dim a(18) As String j = Len(txtUserName.Text) s1 = txtUserName.Text Dim c As Integer c = 1 For i = 1 To j a(i) = Mid(
function validatename(){ var text=document.getElementById('username').value; //if(text==null||text==''){ //不为空和输入的不是空格 if(text==null||text.replace(/^\s+,""/).replace(/^\s+$/,"")==''){ alert('用户名不能为空!'); //重新获得焦点 document.getElementById('username').f