我怎样才能停止旋转?奇怪的事情发生了。这是不起作用的代码:
<body>
<div id="spin">
</div>
<button type="submit" onclick="spin_stop();" id="stop">Stop</button>
<button type="submit" onclick="spin_start();" id="start">Start</button></p>
<script type="text/javascript">
var target = document.getElementById('spin');
function spin_stop() {
spinner.stop();
}
function spin_start() {
var spinner = new Spinner(opts).spin(target);
spinner.spin(target);
}
</script>
</body>
</html>