jQuery:获取具有特定ID的子对象

首先一些HTML:
<div id="tmcl-request" class="tmcl-request" style="display: none">
Request:
<b> Node: </b><span id="node">33947</span>
</div>

比一些JavaScript:

$request = $('#tmcl-request');
$newrequest = $request.clone();

现在的问题是:我想更改< span id =“node”>的内部HTML从$newrequest对象.

怎么办?

谢谢,
Bigbohne

解决方法

$('#tmcl-request').find('#node').html('whatever you want your html to be');

想想,如果你有多个节点,最好使用一个类而不是一个id,所以

$newrequest.find('#node').html('your html');

相关文章

页面搜索关键词突出 // 页面搜索关键词突出 $(function () {...
jQuery实时显示日期、时间 html: &lt;span id=&quot...
jQuery 添加水印 &lt;script src=&quot;../../../.....
中文:Sys.WebForms.PageRequestManagerParserErrorExceptio...
1. 用Response.Write方法 代码如下: Response.Write(&q...
Jquery实现按钮点击遮罩加载,处理完后恢复 思路: 1.点击按...