---
title: "如何实现点击单选框后面的文字来进行选择"
author: "java-xp"
date: "2011-02-18T10:05:23Z"
tags: []
categories: ["Web前端"]
slug: "untitled"
draft: false
lastmod: "2011-02-18T10:05:23Z"
id: 909651
url: "https://java-xp.iteye.com/blog/909651"
---

<input type="radio" name="radio_test" id="radio_test" checked="checked" />
<label for="radio_test">TEST</label>
 <br/>
<input type="radio" name="radio_test" id="radio_test1" >
 <label for="radio_test1">TEST1</label>

label里面的for属性，这样就让label关联到radio上去，点击label就等于点击了id为radio_test的radio元素。