<HTML>
<HEAD>
<TITLE>counter </TITLE>
</head>
<body>
<script type="text/javascript">
var clicks = 0;
function linkClick(){
document.getElementById('clicked').value = ++clicks;
}
document.write('<a href="#" onclick="linkClick()">Add</a>');
</script>
<input id="clicked" size="3" onfocus="this.blur();" value="0" >
<script type="text/javascript">
function linkClick1(){
document.getElementById('clicked').value = --clicks;
}
document.write('<a href="#" onclick="linkClick1()">Subtract</a>');
</script>
</BODY>
</HTML>
这取决于它的点击次数我希望值不低于 0 怎么做?