我有一个html页面(searchCustomer.html),它有一个输入字段,我们在其中输入要在数据库中搜索的字符串,在单击搜索按钮并以html显示后,记录被成功获取。我想在同一页面(searchCustomer.html)中单击第一列(href)时显示从html中单击的记录的详细信息
<form action="/getsearchresults" method="post">
<!-- <form action="/getsearchresults" method= methods=['GET', 'POST'] > -->
<Text text="Customer Name" id="text0"/>
<Input width="200px" name="custName" required placeholder="Please enter the customer name"/>
<button type="submit">Search Customer</button>
<button id="#btnID">TEst Customer</button>
</form>
<table border="1">
<tr><td><strong>Customer Id</strong></td><td><strong>Name</strong></td></tr>
{% for name1 in customers %}
<tr><td><a href="/DispCustomerInfo?query={{ name1.name }}">{{name1.id}}</a></td><td>{{name1.name}}
</td></tr>
{% endfor %}
</table>
单击href,我想在同一页面中显示该记录的详细信息
这里有一个可能的解决方案
在前端,使用
Ajax
获取客户数据相关问题 更多 >
编程相关推荐