随笔分类 - Web前端开发
摘要:事件绑定 方式一:通过HTML标签中的事件属性进行绑定 <input type="button" onclick="on()" value="按钮1"> <script> function on(){ alert( '我被点击了!') }; < /script> 方式二:通过DOM元素属性绑定 <i
阅读全文
摘要:BOM对象 Window:浏览器窗口对象 Navigator:浏览器对象 Screen:屏幕对象 History:历史记录对象 Location:地址栏对象 Window对象 获取 直接window.方法名,window.可以省略 方法 alert() confirm() confirm --确定(
阅读全文
摘要:表格标签 <!--表格-->html <table border="1" cellspacing="0" width="400" align="center"> <tr align="center"> <th>A</th> <th>B</th> <th>C</th> <th>D</th> </tr>
阅读全文