[TOC]
* text 獲取內容
* html 獲取內容及里面的標簽
* val 獲取input里的值
* attr("屬性") 獲取屬性
## 獲取內容
```
<p id="text">內容<a href="#">鏈接</a></p>
<input type="text" value="輸入框" id="input">
<button id="btn1">btn1</button>
<button id="btn2">btn2</button>
<script>
$(document).ready(function () {
$("#btn1").click(function () {
console.log("text:" + $("#text").text())
console.log("text:" + $("#text").html())
})
$("#btn2").click(function () {
console.log("text:" + $("#input").val())
console.log("text:" + $("#input").attr("type"))
})
})
</script>
```
