我没有使用重置按钮,因为我有其他功能也没有工作,我需要这样做才能满足程序要求。我故意不使用jQuery。一切似乎都对我不对。
HTML:
<script src="js/breaker.js"></script> <!-- it seems to be linked right, but nothing is working -->
<form action="#" method="get" onsubmit="return false"> <!-- is there something wrong here? -->
<td><textarea id="text" cols="50" rows="10" style="width: 40em; height: 15em;"></textarea></td>
<input type="text" value="0" id="shift" style="width: 4em;"/>
<input type="button" value="Exit value = 3" onclick ="javascript: clearSetFocus();"/>
使用Javascript:
function clearSetFocus() { //functions seems right
document.getElementById("text").value = "";
}