JS学习01
写入 HTML 输出
1-Document.write("XXX");
document.write("<p>hahh</p>");
document.write("<h>head</h>");
document.write("<h1>head</h1>");//h1 推测是格式不同,测试衍生是的,但是啥格式,还不知道
对事件作出反应
<button type="button" onclick="alert('weclome!')">点击这里</button>
<button> XXXX</button> XX为显示在 button 上的字 ,type是指button 现实的性状 是button ,后面的onclick 是指点击这个button的话会有啥事件发生。alert 是指弹出对话框,显示 " "中内容 。
网友评论