html 表格输入,在HTML中重新输入表格输入

因此,我正在为自己设计一个网站,它通过表单从用户处获取用户输入,在数据库中搜索相同的内容,并返回预期的输出。在HTML中重新输入表格输入

下面显示的是我的HTML代码相同。

String ID,time,result,obj;

Statement stmt,stmt2;

ResultSet rs;

String SQL="";

String k="key";

String w="wallet";

String p="pen";

String a="atm";

ID="";

time="";

result="";

String save=request.getParameter("bSave");

String delete=request.getParameter("BDelete");

String search=request.getParameter("BSearch");

stmt = con.createStatement();

if (search!=null)

{

obj=request.getParameter("ID");

if(obj.equals(k))

{

ID="05447646";

}

else if(obj.equals(w))

{

ID="05447647";

}

else if(obj.equals(p))

{

ID="05447649";

}

else if(obj.equals(a))

{

ID="05447650";

}

rs=stmt.executeQuery("Select * from tablename1 where ID='"+ ID +"'");

while(rs.next()) {

ID=rs.getString("ID");

time=rs.getString("time"); }

}

%>

Intelli-Track Search Interface

#Head1{

position: absolute;

width: 100%;

top: 126px;

visibility: visible;

left: 4px;

}

#tab1 {

position: absolute;

width: 780px;

height: 408px;

z-index: 1;

left: 1px;

top: 272px;

right: auto;

}

#apDiv1 {

position: absolute;

width: 403px;

height: 408px;

z-index: 1;

left: auto;

top: 200px;

right: -1px;

}

.center1 {

text-align: center;

}

#apDiv1 .indent-1 {

text-align: center;

font-size: 44px;

}

#apDiv1 p {

text-align: center;

}

$(document).ready(function(){

$("#login_frm").submit(function(){

//remove previous class and add new "myinfo" class

$("#msgbox").removeClass().addClass('myinfo').text('Validating Your Login ').fadeIn(2000);

this.timer = setTimeout(function() {

$.ajax({

url: 'check.jsp',

data: 'un='+ $('#login_id').val() +'&pw=' + $('#password').val(),

type: 'post',

success: function(msg){

if(msg != 'ERROR') // Message Sent, check and redirect

{ // and direct to the success page

$("#msgbox").html('Login Verified, Logging in.....').addClass('myinfo').fadeTo(900,1,

function()

{

//redirect to secure page

document.location='login.jsp?user='+msg;

});

}

else

{

$("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox

{

//add message and change the class of the box and start fading

$(this).html('Sorry, Wrong Combination Of Username And Password.').removeClass().addClass('myerror').fadeTo(900,1);

});

}

}

});

}, 200);

return false;

});

});

Welcome to Intelli-Track Search Interface


Object

Tag-ID

Last Accessed Date and Time

Object Finder

Enter object to be searched:

这是实际页面的样子:

mI9PX.png

那么这页基本上做的是,当用户在表单中输入的值(有效值是笔, key,atm,wallet),它将检索笔访问的最后一次以及已存储在数据库中的TAG_ID。虽然我可以轻松地检索这两个值。我不知道如何在第一列“OBJECT”中打印对象的名称,它应该打印有效的对象(如笔,钱包,atm,键)

我应该在这部分代码,实现相同。 :

Object

Tag-ID

Last Accessed Date and Time

我已经尝试过使用Document.getElementbyID但那不起作用...!是的,那里也没有验证.. !!

2013-05-20

rahul888

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值