<table class="table" width="100%" layouth="138">
<thead>
<tr>
<th>
状态
</th>
</tr>
</thead>
<tbody>
@foreach (var Storage in ViewBag.StorageList)
{
<tr onmousedown="showVaule()">
<td id="statusid">@Storage.STATUS
</td>
</tr>
}
</tbody>
</table>
==============================================
<script type="text/javascript">
function showTypeInfo() {
alert($("#statusid").val()); //没用呢?
}
</script>
<thead>
<tr>
<th>
状态
</th>
</tr>
</thead>
<tbody>
@foreach (var Storage in ViewBag.StorageList)
{
<tr onmousedown="showVaule()">
<td id="statusid">@Storage.STATUS
</td>
</tr>
}
</tbody>
</table>
==============================================
<script type="text/javascript">
function showTypeInfo() {
alert($("#statusid").val()); //没用呢?
}
</script>
是这样的...一时打快了 还望求助 自己顶个
alert(Storage.STATUS) 好纠结啊
string value=$("#<%=控件的客户端名%>").Val()
<td id ="ShowIt">@Storage.STATUS</td>
$("#statusid").val() = "" 的
string value=$("#qq").Val()
<tr onmousedown="showVaule()">
Tr不是有一个点击此行的事件吗?
$("#statusid").text
<table class="table" width="100%" layouth="138">
<thead>
<tr>
<th>
状态
</th>
</tr>
</thead>
<tbody>
@foreach (var Storage in ViewBag.StorageList)
{
<tr onmousedown="showVaule(this)">
<td>@Storage.STATUS
</td>
</tr>
}
</tbody>
</table>
==============================================
<script type="text/javascript">
function showTypeInfo(t) {
alert($(t).find("td").eq(0).val());
}
</script>
是的,td应该用.text()或者.html()