【发布时间】:2016-08-22 02:04:54
【问题描述】:
我只是第一次尝试 .click,但没有使用 div
https://jsfiddle.net/djsreeraj/rnL7stsm/
html
<body>
<div id="score">0</div>
<div id="start">Start</div>
</body>
css代码
#start {
width: 50px;
padding: 10px 15px;
text-align: center;
font: bold 15px arial;
background-color: #dedede;
color: #000;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
position: absolute;
}
#start:hover {
cursor: pointer;
}
这是jquery代码,.click功能不起作用,如何解决?
$(document).ready(function()
{
$("#start").click(function () {
alert("Hello!");
$("#start").hide();
});
});
【问题讨论】:
-
认为在线编辑器预装了它
标签: javascript jquery