标题:怎么能够实现文本框里输入的内容不能一样.
只看楼主
Kettyjin1983
Rank: 1
等 级:新手上路
帖 子:303
专家分:0
注 册:2007-8-17
结帖率:66.67%
 问题点数:0 回复次数:3 
怎么能够实现文本框里输入的内容不能一样.
下面红框里的内容必须不一样,否则就不能提交,怎样实现啊,同志们,帮我看看吧,非常感谢啊.
<%@ LANGUAGE="vbscript" %>
<!--#include virtual ="/Include/Conn.asp"-->
<!--#include virtual ="/Include/Frequent.asp"-->

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="stylesheet" type="text/css" href="test2.css">
<title>My Assets</title>
<script language="VBScript">

function action_OnClick()
    
        
        form1.submit
end function
</script>
</head>

<body bgcolor="#FFFFFF">

<!--#include file ="Head.htm"-->
<p>   </p>
<form action="dealpending.asp" method="post" name="form1">
<div id="body">

 
  <%    
  
    if owner = "6720CE" or owner = "5900CE" or owner = "7477ME" or owner = "7383CE" then
          set conn=server.createobject("adodb.connection")
        set rs=server.createobject("adodb.recordset")
        constr="Provider=SQLOLEDB;Data Source=HZSQL01;Initial Catalog=HRDB;User ID=ReadWrite;Password=WriteRead"
        conn.open = constr
        rs.open "select * from Lease_equip where active =1",conn,1,1
        if  rs.eof or rs.bof then
            response.write "There is no new equipment need you to cancel."

        else
        
        
    %>
    
<table border="1" width="100%" bordercolorlight="#FF7200" cellspacing="1" cellpadding="4" bordercolordark="#FFFFFF" bgcolor="#F3E4AD" >
<tr ><td colspan="13" align="center">
        Add Function Approve
    <td></tr>
<tr>
    
        <td width="97" height="30">
        <div align="center"><font color="#3366FF" face="Verdana, Arial, Helvetica,sans-serif"><b><font size="2">Org</font></b></font></div>
      </td>
      <td width="97" height="30">
        <div align="center"><font color="#3366FF" face="Verdana, Arial, Helvetica,sans-serif"><b><font size="2">Contract NO</font></b></font></div>
      </td>
      <td width="91">
        <div align="center"><font color="#3366FF" face="Verdana, Arial, Helvetica, sans-serif" size="2" ><b>Equipment Description</b></font></div>
      </td>
      <td width="35">
        <div align="center"><font color="#3366FF" face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Qty</b>
          </font></div>
      </td>
      <td width="49">
        <div align="center"><font color="#3366FF" face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Start Date<br>
          </b></font></div>
      </td>
      <td width="39">
        <div align="center"><font color="#3366FF" face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>End Date<br>
          </b></font></div>
      </td>
       <td width="44">
        <div align="center"><font color="#3366FF" face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>S/N<br>
          </b></font></div>
      </td>
      <td width="72">
        <div align="center"><font color="#3366FF" face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Location<br>
          </b></font></div>
      </td>
       <td width="57">
        <div align="center"><font color="#3366FF" face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Badge<br>
          </b></font></div>
      </td>
       <td width="52">
        <div align="center"><font color="#3366FF" face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Name<br>
          </b></font></div>
      </td>
      <td width="45">
        <div align="center"><font color="#3366FF" face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Dept<br>
          </b></font></div>
      </td>
      
      
       <td width="57">
        <div align="center"><font color="#3366FF" face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Asset NO<br>
          </b></font></div>
      </td>
      
      
      <td width="86">
        <div align="center"><font color="#3366FF" face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Approve?<br>
          </b></font></div>
      </td>
</tr>
<tr>
     <%        do while not rs.eof
         active = "select"&rs("autoid")
        asset = "look"&rs("autoid")
                'response.write     autoid    
            response.write "<tr><td>"&rs("org")&"</td><td>"&rs("contract")&"</td><td>"&rs("equipment")&"</td><td>"&rs("Qty")&"</td><td>"&rs("startday")&"</td><td>"&rs("disabledate")&"</td><td>"&rs("serilno")&"</td><td>"&rs("location")&"</td><td>"&rs("badge")&"</td><td>"&rs("engname")&"</td><td>"&rs("dept")&"</td>"%>
        <td>    <input type = "text" name=<% =asset  %> value = ""></td>        <td><select name=<% =active  %> size="1">
            <option value=<% =1  %>>--------</option>
            <option value=<% =2  %>>Approve</option>
            <option value=<% =4  %>>Reject</option>
            </select>
            
            </td>    
            </tr>
            <%
            rs.movenext
            loop
            rs.close
            set rs=Nothing
            conn.Close
            Set conn= Nothing
    end if
 else
        Response.Write("You have no permission to visit this website")
end if

                  
        
    %>
</table>
</div>
</form>


<!--#include file ="foot.htm"-->
</html>
搜索更多相关主题的帖子: 文本 Microsoft meta content 
2008-06-02 09:55
Kettyjin1983
Rank: 1
等 级:新手上路
帖 子:303
专家分:0
注 册:2007-8-17
得分:0 
<td>    <input type = "text" name=<% =asset  %> value = ""></td> 就是这个文本框的内容不能一样,怎么限制啊,
2008-06-02 09:56
frankqnj
Rank: 4
等 级:贵宾
威 望:12
帖 子:320
专家分:278
注 册:2008-4-6
得分:0 
看你要在哪限制了  要在asp中限制 就对比接收的数据 是否有相同的

要在客户端限制 就写个脚本  分别在2个 文本框里  用onchange 事件 调用 对比 其值的 函数 或者 直接 写在submit 按钮上 的onclick 事件 调用对比函数

如果想等 window.evetn.returnValue=false; alert('内容不能相同')
2008-06-02 16:16
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
得分:0 
<input type = "text" name=<% =asset  %> value = "">
这个文本框跟那个数据比较不能相等?上一次的文本框输入的数据?
2008-06-02 16:29



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-217115-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.426303 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved