摘要: Dom操作 1.文本内容操作 - innerText:操作文本 - innerHtml:操作全内容 innerText的作用是获取文本内容,而innerHTML的作用则连标签一起获取(全内容)。 赋值的方式item.innerText="程序员";item.innerHTML="<p>程序员</p> 阅读全文
posted @ 2019-03-08 17:21 土味程序员 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Javascript相关内容 1.序列化--json - stringify() 将对象转换为字符串 - parse() 将字符串转换为对象 2.字符串转义--encodeURI - encodeURI(url); - decodeURI(url); - decodeURIComponent(url 阅读全文
posted @ 2019-03-08 15:34 土味程序员 阅读(245) 评论(0) 推荐(0) 编辑