<!doctype html><html><head><meta charset="utf-8"><title>无标题文档</title><script type="text/javascript">function yname(){ var obj=document.getElementById("Name"); var yourname=obj.value; if(yourname!=null) alert("你好!"+yourname); else alert("请输入你的姓名!");}</script></head><body><form><p>姓名:<input type="text" id="Name" ></p><input type="button" value="确定" onclick="yname()" /></form></body></html>
添加回答
举报
0/150
提交
取消