HTML表格中的函数showdetails [英] function showdetails in HTML table
本文介绍了HTML表格中的函数showdetails的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨Chaps
我试图将HTML表数据显示为详细信息表单。但我得到错误 ReferenceError:未定义showDetails
以下是我的HTML代码:
< div class = table id = tab1 >
< 表 class = basic-table id = mytable >
< thead >
< span class =code-keyword>< tr >
< td > < label > Id < / label > < / td > ;
< td align = left > < input 类型 = text id = id class = medium 名称 = value = > < / td >
< / tr >
< tr >
< td > < 标签 > FirstName < < span class =code-leadatt ribute> / label > < / td >
< td align = left > < 输入 type = text id = firstName class = < span class =code-keyword> medium name = value = > < / td >
< / tr > ;
< tr >
< td > < 标签 > LastName < / label > < / td >
< td align = left > < 输入 类型 = text id = lastName class = medium name = value = > < / td >
< / tr >
< tr >
< td > < label > licenseId < / label > < / td > ;
< td align = left > < 输入 t ype = text id = licenseId class = medium 名称 = value = > < / td >
< / tr >
< tr >
< td > < label > 电话< / label > < / td > ;
< td align = left > < 输入 类型 = text id = 电话 class = medium 名称 = value = > < / td >
< / tr < span class =code-keyword>>
< tr >
< td > < label > 电子邮件< / label > < / td >
< td align = left > < input type = text id = email class = large 名称 = value = > < / td >
< / tr >
< / thead >
< / table >
这是我的Java脚本代码:
function ShowDetails(id){
$( #id)。html(' ' + cont.id);
$( #firstName)。html(' ' + cont.firstName);
$( #lastName)。html( + cont.lastName);
$( #licenseId)。html( + cont.licenseId);
$( #phone)。html( + cont.telephone);
$( #mail)。html( + cont.email);
$( #detailview)。click();
}
我想将HTML表数据显示为详细信息表单。请帮我澄清我做错了什么。
预先致谢
问候
SK
解决方案
( #id)。html(' ' + cont.id);
( #firstName)。html(' ' + cont.firstName);
( #lastName)。html( 跨度> + cont.lastName);
Hi Chaps
I am trying to show the HTML table data to a Detail form. But i am getting with the error ReferenceError: showDetails is not defined
Below is my HTML code:
<div class="table" id="tab1">
<table class="basic-table" id="mytable">
<thead>
<tr>
<td><label >Id</label></td>
<td align="left"><input type="text" id="id" class="medium" name="" value=""></td>
</tr>
<tr>
<td><label>FirstName</label></td>
<td align="left"><input type="text" id="firstName" class="medium" name="" value=""></td>
</tr>
<tr>
<td><label>LastName</label></td>
<td align="left"><input type="text" id="lastName" class="medium" name="" value=""></td>
</tr>
<tr>
<td><label >licenseId</label></td>
<td align="left"><input type="text" id="licenseId" class="medium" name="" value=""></td>
</tr>
<tr>
<td><label>Telephone</label></td>
<td align="left"><input type="text" id="telephone" class="medium" name="" value=""></td>
</tr>
<tr>
<td><label>Email</label></td>
<td align="left"><input type="text" id="email" class="large" name="" value=""></td>
</tr>
</thead>
</table>
This is my Java Script code:
function ShowDetails(id){
$("#id").html(''+cont.id);
$("#firstName").html(''+cont.firstName);
$("#lastName").html(""+cont.lastName);
$("#licenseId").html(""+cont.licenseId);
$("#telephone").html(""+cont.telephone);
$("#email").html(""+cont.email);
$("#detailview").click();
}
I want to show the HTML table data to a Detail form. Pls help me to pint out what mistake i have done.
Thanks in Advance
Regards
SK
解决方案
("#id").html(''+cont.id);
("#firstName").html(''+cont.firstName);
("#lastName").html(""+cont.lastName);
这篇关于HTML表格中的函数showdetails的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文