首页 > Web开发 > 详细

js this获取元素ID

时间:2017-10-22 20:09:13      阅读:481      评论:0      收藏:0      [点我收藏+]
    <table id="cyyj_table" class="table01" cellpadding="5" cellspacing="1">
            <tbody id="tb">
             	<#list li as li>
             		<tr id=‘${li.id}‘>
             			<td width="80%">
             				<input id =‘${li.id}‘ class="customold" style="width:85%"  value=‘${li.custom}‘/>
             			</td>
             			<td align="center">
             				<input class="ordold" style="width:52px" type="number" value=‘${li.ord}‘/>
             			</td>
             			<td align="center">
             				<a class="zxui-linkbutton"  onclick="detCus(‘${li.id}‘);">删除</a>
             			</td>
             		</tr>
             	</#list>
            </tbody>
        </table>

js获取table两个input空间的值以及其id。

	$(".customold").each(function(){
		var customold = $(this).val();
		var obj = $(this);
		var customoldid = $(obj).attr(‘id‘);
		customolds+=customold+‘,‘;
		customoldids+=customoldid+‘,‘;
	});

 

js this获取元素ID

原文:http://www.cnblogs.com/ckxlovejava/p/7710792.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!