菜鸟教程 tryjs_functionarg2 在线代码实例

运行 保存 全屏 右侧展示 实时查看
主题:

 <form> 
<input type="button" onclick="myfunction('Good Morning!')" value="In the Morning"> 

<input type="button" onclick="myfunction('Good Evening!')" value="In the Evening"> 
</form> 

<p>
When you click on one of the buttons, a function will be called. The function will alert
the argument that is passed to it.
</p>