1
<p><del id="myDel" cite="why_deleted.htm">这个文本已经本删除</del></p>
2
<p>点击按钮返回删除文本的cite属性值。</p>
3
<p id="demo"></p>
4
<button onclick="myFunction()">点我</button>
5
<script>
6
function myFunction() {
7
var x = document.getElementById("myDel").cite;
8
document.getElementById("demo").innerHTML = x;
9
}
10
</script>