日期:2014-05-16 浏览次数:20422 次
$(".info").text("your txt");
------解决方案--------------------
1楼+1
补充个。
$(".info").text("i love you.");
------解决方案--------------------
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$(".info").text("我爱你们,too");
});
});
</script>
</head>
<body>
<div class="info">我爱你们</div>
<button>修改</button>
</body>
</html>
------解决方案--------------------
$(function(){
$("button").click(function(){
$(".info").html("I Love You");
});
});