From 737c1709616f09f6427f24a3f3cdb6fbdc40dd7f Mon Sep 17 00:00:00 2001 From: qianguyihao Date: Wed, 30 Jan 2019 18:57:36 +0800 Subject: [PATCH] =?UTF-8?q?update:=E8=A1=A5=E5=85=85=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 03-JavaScript基础/21-DOM操作.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/03-JavaScript基础/21-DOM操作.md b/03-JavaScript基础/21-DOM操作.md index 721077a..27817a8 100644 --- a/03-JavaScript基础/21-DOM操作.md +++ b/03-JavaScript基础/21-DOM操作.md @@ -809,14 +809,14 @@ DOM对象的属性和HTML的标签属性几乎是一致的。例如:src、titl **获取内容举例:** -如果我们想获取innerHTML和innerText里的内容,看看会如何: +如果我们想获取innerHTML和innerText里的内容,看看会如何:(innerHTML会获取到标签本身,而innerText则不会) ![](http://img.smyhvae.com/20180127_1652.png) 上图显示,因为innerText识别不出标签,所以把标签也给获取到了。 -**修改内容举例:** +**修改内容举例:**(innerHTML会修改标签本身,而innerText则不会) ![](http://img.smyhvae.com/20180127_1657.png)