适用于 jsFiddle 的代码:http: //jsfiddle.net/NTadX/
我的 jquery 代码:
<link rel="stylesheet"
href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
<link rel="stylesheet" href="/CSS/mystyle.css" />
<style>
$(function(){
$("input[value='WN']").hover(
function() {
$('#divid').empty();
$("#divid").append("<div>WN: Weekly Number. The number of consecutive weeks you want to book the room</div>");
$("#divid").toggle();
}
);
$("input[value='DN']").hover(
function() {
$('#divid').empty();
$("#divid").append("<div>DN: Day Number. The number of consecutive days you want to book the room</div>");
$("#divid").toggle();
}
);
$("input[value='DD']").hover(
function() {
$('#divid').empty();
$("#divid").append("<div>DD: Day date. The date till which you want to book the room for consecutive days </div>");
$("#divid").toggle();
}
);
$("input[value='WD']").hover(
function() {
$('#divid').empty();
$("#divid").append("<div>WD: Weekly date. The date till which you want to book the room for consecutve weeks</div>");
$("#divid").toggle();
}
);
});
</style>
我已经检查过了,上面的代码只有在文档完全加载时才开始......我真的不知道为什么它不起作用。我在谷歌应用引擎上运行这个。谢谢