tryit_view.asp@filename=trydhtml_css_bgcolor

来自「W3Schools tutorial..web designing」· ASP@FILENAME=TRYDHTML_CSS_BGCOLOR 代码 · 共 35 行

ASP@FILENAME=TRYDHTML_CSS_BGCOLOR
35
字号
<html>
<head>

<script type="text/javascript">
function bgChange(bg)
{
document.body.style.background=bg;
}
</script>
</head>

<body>

<b>Mouse over the squares and the background color will change!</b>

<table width="300" height="100">
 <tr>
  <td onmouseover="bgChange('red')" 
      onmouseout="bgChange('transparent')"
      bgcolor="red">
  </td>
  <td onmouseover="bgChange('blue')" 
      onmouseout="bgChange('transparent')"
      bgcolor="blue">
  </td>
  <td onmouseover="bgChange('green')" 
      onmouseout="bgChange('transparent')"
      bgcolor="green">
  </td>
</tr>
</table>

</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?