---
title: "JQuery获取Radio选中的值"
author: "xdwangiflytek"
date: "2012-08-31T14:57:43Z"
tags: []
categories: ["Web前端"]
slug: "jquery-radio"
draft: false
lastmod: "2012-08-31T14:57:42Z"
id: 1668908
url: "https://xdwangiflytek.iteye.com/blog/1668908"
---

```
JS：
var type = $("input:[name=uploadType]:radio:checked").val();

HTML：
<input type="radio" name="uploadType" value="doc" id="tt1"/>
<label for="tt1">Document</label>&nbsp;&nbsp;
<input type="radio" name="uploadType" checked="checked" id="tt2" value="audio" />
<label for="tt2">Media</label>
```