---
title: "jquery操作radio"
author: "yukar"
date: "2013-09-09T16:36:05Z"
tags: ["jQuery", "radio"]
categories: ["Web前端"]
slug: "jquery-radio"
draft: false
lastmod: "2013-09-09T16:36:05Z"
id: 1939594
url: "https://yukar.iteye.com/blog/1939594"
---

```
                            <p>
                                <label>组件属性：</label>
                                <input type="radio" onclick="chooseProperty()" name="property" value="0" {if !$info[property] || $info[property]==0}checked{/if} />公共组件
                                <input type="radio" onclick="chooseProperty()" name="property" value="1" {if $info[property]==1}checked{/if} />特殊模板组件
                            </p>
```

 用jquery获取radio数据

```
	function chooseProperty(){
		var item = $("input[name='property']:checked").val();
		alert(item);
	}
```