2
下面是我专注于的代码示例。我试图将其与我的测试网站合并,并且代码不起作用。我不明白为什么,在这两种情况下,我使用的是最新版本的Jquery(1.5)。我正在使用Google的托管API用于我的测试网站。未在测试网站上运行的Jquery代码
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script>
<script>
$('#name-label').dblclick(function() {
$("#name").val('some text');
});
</script>
<div class="ctrlHolder">
<label for="" id="name-label">Name</label>
<input name="name" id="name" type="text" class="textInput small" />
<p class="formHint">The name of the item you are submitting</p>
</div>
可以尝试直播功能http://api.jquery.com/live/ – 2011-02-10 23:06:54
我不太知道如何使用该功能 – Ambo100 2011-02-10 23:09:54