⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 21-4 设置自定义方法.htm

📁 JAVASCRIPT完全自学手册,中源码的验证修订实例
💻 HTM
字号:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=GB2312" />
<title>21-4  设置自定义方法</title>
<style>
* { font-size:12px; font-family:宋体, Arial; } /*规定了所有的字体样式*/
body { overflow:auto; background-color:buttonface; border-style:none; }
.toggleButton {
    display:inline; background-color:buttonface;
    padding:2px 10px; margin:0px 10px; cursor:pointer;
    border:2px outset white;
    behavior:url(../inc/htc/21-4.htc); /* 定义反转按钮行为 */
}
</style>
</head>
<body>
<div class="toggleButton" onclick="this.toggle();">这是反转按钮1</div>
<div class="toggleButton" onclick="this.toggle();">这是反转按钮2</div>
</body>
</html>

⌨️ 快捷键说明

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