<script type="text/javascript">
window.onload=function(){
var oK=document.getElementById("k");
oK.onclick=function(){
alert("哈哈,调用函数了!");
};
</script>
?
??
....不错