javascirpt问题高手来很简单的问题 ( 积分: 100 )

  • 主题发起人 yunxi126
  • 开始时间
Y

yunxi126

Unregistered / Unconfirmed
GUEST, unregistred user!
<html:text property=&quot;uid&quot;
name=&quot;uid1&quot;></html:text>
<html:text property=&quot;pwd&quot;
name=&quot;pwd2&quot;></html:text>
<a href=&quot;<%=request.getContextPath()%>/abc.do?uid=这里等于第一个文本框的值&amp;pwd=这里等于第二个文本框的值&quot;>abc_do</a><br>
最好用javascript实现或jsp也行
 
C

cpj7406

Unregistered / Unconfirmed
GUEST, unregistred user!
惊讶!
这种类似登录验证的功能如何能提出问题来呢?????
我没有别的意思,您不会是初学 Web 开发吧?或者,有非常特殊的功能需求?
那个什么 abc.do 搞成 form 的action
那个锚,执行 submit();
服务端程序 asp 或 jsp,自然就能通过 request.Form(&quot;&quot;) 知道 uid 和 pwd的值。
说的不对一定请你一笑置之!
 
F

fei_1

Unregistered / Unconfirmed
GUEST, unregistred user!
第一个文本框的值=document.uid1.value
第二个文本框的值=document.pwd2.value
 
Y

yunxi126

Unregistered / Unconfirmed
GUEST, unregistred user!
搞定了。 。。代码贴出来大家一起学习一下。有能简化的吗。
<script language=&quot;javascript&quot;>

function get(){
alert(document.getElementById(&quot;sheet_no&quot;).value);
}



var allTheValues = new Object();
function setValue(){
allTheValues.shpID=document.getElementById(&quot;shpID&quot;).value;
allTheValues.txid=document.getElementById(&quot;txid&quot;).value;

allTheValues.byr_addr_seq=document.getElementById(&quot;byr_addr_seq&quot;).value;
allTheValues.update_date=document.getElementById(&quot;update_date&quot;).value;

allTheValues.bathch_no=document.getElementById(&quot;bathch_no&quot;).value;
allTheValues.sheet_no=document.getElementById(&quot;sheet_no&quot;).value;

allTheValues.update_user=document.getElementById(&quot;update_user&quot;).value;
allTheValues.recv_date=document.getElementById(&quot;recv_date&quot;).value;

allTheValues.shp_date=document.getElementById(&quot;shp_date&quot;).value;
allTheValues.pcy_no=document.getElementById(&quot;pcy_no&quot;).value;

allTheValues.byr_code=document.getElementById(&quot;byr_code&quot;).value;
allTheValues.inv_no=document.getElementById(&quot;inv_no&quot;).value;


allTheValues.pay_mathod=document.getElementById(&quot;pay_mathod&quot;).value;
allTheValues.pay_type=document.getElementById(&quot;pay_type&quot;).value;

allTheValues.byr_name_seq=document.getElementById(&quot;byr_name_seq&quot;).value;
allTheValues.pay_period=document.getElementById(&quot;pay_period&quot;).value;

var theUrl = &quot;<%=request.getContextPath()%>/pages/DeMaintenance/deMst.do?shpID=&quot;+allTheValues.shpID+
&quot;&amp;txid=&quot;+ allTheValues.txid+

&quot;&amp;byr_addr_seq=&quot;+allTheValues.byr_addr_seq+
&quot;&amp;update_date=&quot;+allTheValues.update_date+

&quot;&amp;bathch_no=&quot;+allTheValues.bathch_no+
&quot;&amp;sheet_no=&quot;+allTheValues.sheet_no+

&quot;&amp;update_user=&quot;+allTheValues.update_user+
&quot;&amp;recv_date=&quot;+allTheValues.recv_date+

&quot;&amp;shp_date=&quot;+allTheValues.shp_date+
&quot;&amp;pcy_no=&quot;+allTheValues.pcy_no+

&quot;&amp;byr_code=&quot;+allTheValues.byr_code+
&quot;&amp;inv_no=&quot;+allTheValues.inv_no+

&quot;&amp;pay_mathod=&quot;+allTheValues.pay_mathod+
&quot;&amp;pay_type=&quot;+allTheValues.pay_type+

&quot;&amp;byr_name_seq=&quot;+allTheValues.byr_name_seq+
&quot;&amp;pay_period=&quot;+allTheValues.pay_period;

return theUrl;
}



var allTheValues = new Object();
function setValuen(){
allTheValues.shpID=document.getElementById(&quot;shpID&quot;).value;
allTheValues.txid=document.getElementById(&quot;txid&quot;).value;

allTheValues.byr_addr_seq=document.getElementById(&quot;byr_addr_seq&quot;).value;
allTheValues.update_date=document.getElementById(&quot;update_date&quot;).value;

allTheValues.bathch_no=document.getElementById(&quot;bathch_no&quot;).value;
allTheValues.sheet_no=document.getElementById(&quot;sheet_no&quot;).value;

allTheValues.update_user=document.getElementById(&quot;update_user&quot;).value;
allTheValues.recv_date=document.getElementById(&quot;recv_date&quot;).value;

allTheValues.shp_date=document.getElementById(&quot;shp_date&quot;).value;
allTheValues.pcy_no=document.getElementById(&quot;pcy_no&quot;).value;

allTheValues.byr_code=document.getElementById(&quot;byr_code&quot;).value;
allTheValues.inv_no=document.getElementById(&quot;inv_no&quot;).value;


allTheValues.pay_mathod=document.getElementById(&quot;pay_mathod&quot;).value;
allTheValues.pay_type=document.getElementById(&quot;pay_type&quot;).value;

allTheValues.byr_name_seq=document.getElementById(&quot;byr_name_seq&quot;).value;
allTheValues.pay_period=document.getElementById(&quot;pay_period&quot;).value;

var theUrl = &quot;<%=request.getContextPath()%>/pages/DeMaintenance/deMst.do?shpID=&quot;+allTheValues.shpID+
&quot;&amp;txid=&quot;+ allTheValues.txid+

&quot;&amp;byr_addr_seq=&quot;+allTheValues.byr_addr_seq+
&quot;&amp;update_date=&quot;+allTheValues.update_date+

&quot;&amp;bathch_no=&quot;+allTheValues.bathch_no+
&quot;&amp;sheet_no=&quot;+allTheValues.sheet_no+

&quot;&amp;update_user=&quot;+allTheValues.update_user+
&quot;&amp;recv_date=&quot;+allTheValues.recv_date+

&quot;&amp;shp_date=&quot;+allTheValues.shp_date+
&quot;&amp;pcy_no=&quot;+allTheValues.pcy_no+

&quot;&amp;byr_code=&quot;+allTheValues.byr_code+
&quot;&amp;inv_no=&quot;+allTheValues.inv_no+

&quot;&amp;pay_mathod=&quot;+allTheValues.pay_mathod+
&quot;&amp;pay_type=&quot;+allTheValues.pay_type+

&quot;&amp;byr_name_seq=&quot;+allTheValues.byr_name_seq+
&quot;&amp;pay_period=&quot;+allTheValues.pay_period+
&quot;&amp;is_inv=N&quot;;

return theUrl;
}
 
Y

yunxi126

Unregistered / Unconfirmed
GUEST, unregistred user!
接受答案了.
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
468
import
I
I
回复
0
查看
455
import
I
顶部