| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3142 人关注过本帖
标题:一个页面上几个不同的按钮。怎么样实现我点击某个按钮在地下出现不同的表单
只看楼主 加入收藏
youquan0352
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2010-6-12
结帖率:0
收藏
已结贴  问题点数:20 回复次数:2 
一个页面上几个不同的按钮。怎么样实现我点击某个按钮在地下出现不同的表单
页面上有四个不同的按钮,点击不同的安妮填写不同的表单,填写完出现在当前页面,但是我就是不清楚怎么弄才能在当前表单点击修改的时候出现上面四个不同按钮下生成的表单。。我现在不管用那个按钮进去填写表单。在当前现实的都是默认第一个的表单。。急啊
搜索更多相关主题的帖子: 表单 按钮 页面 
2010-06-12 16:26
youquan0352
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2010-6-12
收藏
得分:0 
具体代码


<!--#include file="../../incnew/db.asp" -->
<!--#include file="../../incnew/security_check.asp" -->
<%
  Security_Check "891106"  
%>

<HTML>
<HEAD>
<link rel="stylesheet" type="text/css" href="../../css/content.css">
<script src="../../js/changecolor.js" type="text/javascript"></script>
<script language="javascript">

function insertnew(){
        window.location = "outstore.asp"
    }
    function gotobill(idstr){
        window.location = "outstore.asp?back=yes&id="+idstr;
    }
    function insertnew1(){
        window.location = "outstore1.asp"
    }
    function gotobill(idstr){
        window.location = "outstore1.asp?back=yes&id="+idstr;
    }
        function insertnew3(){
        window.location = "outstore3.asp"
    }
    function gotobill(idstr){
        window.location = "outstore3.asp?back=yes&id="+idstr;
    }
        function insertnew2(){
        window.location = "outstore2.asp"
    }
   
    function gotobill(idstr){
        window.location = "outstore2.asp?back=yes&id="+idstr;
    }

</script>
</HEAD>
<BODY>
<div class='page_operation'>
        <input name="EmergencyBj" id="EmergencyBj" type="button" class="btn" value="填写应急板件出库单" onClick="insertnew2()"></td>
        <td width="15%">&nbsp;
          <input name="ordinaryBj" id="ordinaryBj" type="button" class="btn" value="填写普通板件出库单" onClick="insertnew()"></td>
        <td width="16%">&nbsp;
          <input name="cableBj" id="cableBj" type="button" class="btn" value="填写光缆/线缆出库单" onClick="insertnew1()"></td>
        <td width="24%">&nbsp;
          <input name="InstrumentationBj" id="InstrumentationBj" type="button" class="btn" value="填写仪器仪表出库单" onClick="insertnew3()">
</div>
<div class="page_title">
    <table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="100%" align="left">
        <table  width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><img src="../../images/page_title1.gif"></td>
            <td width="98%" background="../../images/page_title2.gif" class="page_title_text">已填写出库单</td>
            <td><img src="../../images/page_title3.gif"></td>
          </tr>
        </table>
        </td>
        <td width="1%" align="right"><img src="../../images/page_title5.gif"></td>
      </tr>
    </table>
</div>
<div class="content_frame_notitle">
    <table width="100%" border="0" cellpadding="0" cellspacing="1" class="content_list" onMouseOver='overIt()' onMouseOut='outIt()'  bgcolor='#C1E1F9'>
        <tr>
            <th>出库单号</th>
            <th>备件所属厂家</th>
            <th>备件型号</th>
            <th>出库日期</th>
            <th>出库原因</th>
            <th>操作</th>
        </tr>
        <%
            if hasSecurity("891108")=true then
                sqlhere = "select sp.*,en.factoryname,mo.modelcode,se.xtxx from sp_out sp,en_factory en,sp_model mo,selectoption se  where sp.FACTORYCODE=en.factorycode and mo.code=sp.MODELCODE and se.xtbm=sp.BILLSTATUS and se.type='ck_bill_status' and sp.BILLSTATUS ='ck01'"
            else
                sqlhere = "select sp.*,en.factoryname,mo.modelcode,se.xtxx from sp_out sp,en_factory en,sp_model mo,selectoption se  where sp.FACTORYCODE=en.factorycode and mo.code=sp.MODELCODE and se.xtbm=sp.BILLSTATUS and se.type='ck_bill_status' and sp.BILLSTATUS ='ck01' and sp.OUTDEPARTMENT='"& session("GROUPNAME") &"'"
            end if
            set rsthere = executeQuerySql(sqlhere)
            if not rsthere.eof then
        %>
                <tr>
                    <td colspan="6">&nbsp;共计<%=rsthere.recordcount%>条记录</td>
                </tr>
        <%
                while not rsthere.eof
        %>
                <tr align="center">
                    <td width="15%"><a href="outstore.asp?view=view&id=<%=rsthere("id")%>"><%=rsthere("id")%></a></td>
                    <td width="15%"><%=rsthere("factoryname")%></td>
                    <td width="20%"><%=rsthere("modelcode")%></td>
                    <td width="20%"><%=rsthere("OUTDATE")%></td>
                    <td width="10%"><%=rsthere("OUTREASON")%></td>
                    <td width="20%"><input type="button" class="btn" value="修改" onClick="gotobill('<%=rsthere("id")%>')"></td>
                </tr>
        <%   
                    rsthere.movenext
                wend
            else %>
                <tr>
                    <td colspan="6">暂时没有待签发的出库单!</td>
                </tr>
        <%    end if %>
    </table>
</div>

<div class="page_title" style="margin-top:50px">
    <table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="100%" align="left">
        <table  width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><img src="../../images/page_title1.gif"></td>
            <td width="98%" background="../../images/page_title2.gif" class="page_title_text">已撤回出库单</td>
            <td><img src="../../images/page_title3.gif"></td>
          </tr>
        </table>
        </td>
        <td width="1%" align="right"><img src="../../images/page_title5.gif"></td>
      </tr>
    </table>
</div>
<div class="content_frame_notitle">
    <table width="100%" border="0" cellpadding="0" cellspacing="1" class="content_list" onMouseOver='overIt()' onMouseOut='outIt()'  bgcolor='#C1E1F9'>
        <tr>
            <th>出库单号</th>
            <th>备件所属厂家</th>
            <th>备件型号</th>
            <th>出库日期</th>
            <th>出库原因</th>
            <th>操作</th>
        </tr>
        <%
        if hasSecurity("891108")=true then
            sqlhere = "select sp.*,en.factoryname,mo.modelcode from sp_out sp,en_factory en,sp_model mo  where sp.FACTORYCODE=en.factorycode and mo.code=sp.MODELCODE and sp.BILLSTATUS='ck11'"
        else
            sqlhere = "select sp.*,en.factoryname,mo.modelcode from sp_out sp,en_factory en,sp_model mo  where sp.FACTORYCODE=en.factorycode and mo.code=sp.MODELCODE and sp.BILLSTATUS='ck11' and sp.OUTDEPARTMENT='"& session("GROUPNAME") &"' and sp.OUTPERSON='"& session("user") &"'"
        end if
            set rsthere = executeQuerySql(sqlhere)
            if not rsthere.eof then
        %>
                <tr>
                    <td colspan="6">&nbsp;共计<%=rsthere.recordcount%>条记录</td>
                </tr>
        <%
                while not rsthere.eof
        %>
                <tr align="center">
                    <td width="15%"><%=rsthere("id")%></td>
                    <td width="15%"><%=rsthere("factoryname")%></td>
                    <td width="20%"><%=rsthere("modelcode")%></td>
                    <td width="20%"><%=rsthere("OUTDATE")%></td>
                    <td width="10%"><%=rsthere("OUTREASON")%></td>
                    <td width="20%"><input type="button" class="btn" value="修改" onClick="gotobill('<%=rsthere("id")%>')"></td>
                </tr>
        <%   
                    rsthere.movenext
                wend
            else %>
                <tr>
                    <td colspan="6">暂时没有已撤回的出库单!</td>
                </tr>
        <%    end if %>
    </table>
</div>

</BODY>
</HTML>
2010-06-12 16:30
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:20 
是以id来区分不同的表单?如果是楼主不需要写这么多js判断,把id传过去用request判断一下就可以比如
<%
  select case request("id")
       case "0"
         '表单1的代码
       case "1"
         '表单2的代码     
  end select
%>
等等以此类推
2010-06-12 17:06
快速回复:一个页面上几个不同的按钮。怎么样实现我点击某个按钮在地下出现不同的 ...
数据加载中...
 
   



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

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