求解 为什么我这样写暂停不了
<button id="btn1" onclick="getTime()">开始</button>
<button id="btn" onclick="stopTime()">按钮</button>
<p id="time"></p>
</body>
<script type="text/javascript">
/* var myTime = setInterval(function () {
getTime();
},1000);*/
function getTime() {
var d = new Date();
var t = d.toLocaleTimeString();
setInterval("getTime()",1000);
document.getElementById("time").innerHTML=t;
}
function stopTime() {
clearInterval();
}