JavaScript点击事件-一个按钮触发另一个按钮

<input type="button" value="Click" id="C" onclick="Go();">
<input type="button" value="Wait" id="W" onclick="javascript:alert('Amazing!');">

<script>
var C=document.getElementById("C");
var W=document.getElementById("W");
function Go(){
W.onclick();
}
</script>