HTML DOM Ins 对象
HTML DOM Ins 对象表示 HTML 文档中的 <<ins> 元素。
创建 ins 对象
语法
以下是语法:
document.createElement(“INS”);
ins 对象的属性
| 属性 | 说明 |
|---|---|
| cite | 它返回并更改 HTML 文档中 ins 元素的 cite 属性值。 |
| dateTime | 它返回并更改 HTML 文档中 ins 元素的 cite 属性值。 |
让我们看一个 ins 对象的示例:
示例
<!DOCTYPE html>
<html>
<style>
body {
text-align: center;
background-color: #fff;
color: #0197F6;
}
h1 {
color: #23CE6B;
}
</style>
<body>
<h1>DOM ins Object Demo</h1>
<button onclick="createIns()" class="btn">Create an ins object</button>
<script>
function createIns() {
var insElement = document.createElement("INS");
insElement.innerHTML = 'I\'m a <ins> element in HTML';
document.body.appendChild(insElement);
}
</script>
</body>
</html>输出

点击“创建 ins 对象”按钮创建一个 ins 对象。

广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP