<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
#circle {
width:200px;
height:200px;
background-color:blue;
border-radius:100px;
margin:10px;
}
</style>
<script src="file:///C|/Users/Gopal/Desktop/jquery-1.11.2.js"></script>
</head>
<body>
<div id="circle"></div>
<p>THIS IS A CIRCLE</p>
</body>
<script>
$("#circle").click(function() {
$("p").hmtl("its changed");
});
</script>
</html>
当我在圈子上点击时,我希望圈子下方的文字更改为我的 $(“p”)中提到的文字.hmtl(“已更改”); < / strong>但它没有发生
答案 0 :(得分:0)
<div id="circle">I am a circle</div>
<p>THIS IS A CIRCLE</p>
$("#circle").click(function(){
$("p").html("Changed");
});