---
title: "jQuery 中 attr() 和 prop() 方法的区别"
author: "accphc"
date: "2014-05-30T14:47:16Z"
tags: []
categories: ["Web前端"]
slug: "jquery-attr-prop"
draft: false
lastmod: "2014-05-30T14:47:16Z"
id: 2074271
url: "https://hc24.iteye.com/blog/2074271"
---

**具有 true 和 false 两个属性的属性，如 checked, selected 或者 disabled 使用prop()，其他的使用 attr()，具体见下表：**

![](http://wenzhixin.net.cn/posts/2013/05/24/attr_prop.png)