文本操作:
$(..).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>