标签:head back text NPU utf-8 type charset body title
文本操作:
$(..).text() # 获取文本内容
$(..).text(‘<a>1</a>‘) # 设置文本内容
$(..).html()
$(..).html(‘<a>1</a>‘)
$(..).val()
$(..).val(..)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <div>123</div> <script src="jquery-2.12.4.js"></script> <script> console.log($(‘div‘).text()) </script> </body> </html>
文本操作 $(..).text() $(..).html() $(..).val()最后一种主要用于input
标签:head back text NPU utf-8 type charset body title
原文地址:https://www.cnblogs.com/my-love-is-python/p/9309605.html