<legend id='WspCe'><style id='WspCe'><dir id='WspCe'><q id='WspCe'></q></dir></style></legend>

      <small id='WspCe'></small><noframes id='WspCe'>

    1. <i id='WspCe'><tr id='WspCe'><dt id='WspCe'><q id='WspCe'><span id='WspCe'><b id='WspCe'><form id='WspCe'><ins id='WspCe'></ins><ul id='WspCe'></ul><sub id='WspCe'></sub></form><legend id='WspCe'></legend><bdo id='WspCe'><pre id='WspCe'><center id='WspCe'></center></pre></bdo></b><th id='WspCe'></th></span></q></dt></tr></i><div id='WspCe'><tfoot id='WspCe'></tfoot><dl id='WspCe'><fieldset id='WspCe'></fieldset></dl></div>
    2. <tfoot id='WspCe'></tfoot>

        <bdo id='WspCe'></bdo><ul id='WspCe'></ul>

        通过单击标签来切换 HTML 单选按钮

        Toggle HTML radio button by clicking its label(通过单击标签来切换 HTML 单选按钮)
        <i id='wyXhq'><tr id='wyXhq'><dt id='wyXhq'><q id='wyXhq'><span id='wyXhq'><b id='wyXhq'><form id='wyXhq'><ins id='wyXhq'></ins><ul id='wyXhq'></ul><sub id='wyXhq'></sub></form><legend id='wyXhq'></legend><bdo id='wyXhq'><pre id='wyXhq'><center id='wyXhq'></center></pre></bdo></b><th id='wyXhq'></th></span></q></dt></tr></i><div id='wyXhq'><tfoot id='wyXhq'></tfoot><dl id='wyXhq'><fieldset id='wyXhq'></fieldset></dl></div>
        <tfoot id='wyXhq'></tfoot>
        • <bdo id='wyXhq'></bdo><ul id='wyXhq'></ul>

            <tbody id='wyXhq'></tbody>

                  <small id='wyXhq'></small><noframes id='wyXhq'>

                  <legend id='wyXhq'><style id='wyXhq'><dir id='wyXhq'><q id='wyXhq'></q></dir></style></legend>
                1. 本文介绍了通过单击标签来切换 HTML 单选按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  是否有一种简单的方法来切换单选按钮 - 当单击它附近的文本时 - 无需在我的小型 PHP 项目中引入任何大型 Javascript 框架?

                  Is there please a simple way to make a radio button toggle - when a text near it is clicked - without introducing any big Javascript Framework into my smal PHP project?

                  Web 表单如下所示:

                  The web form looks like this:

                  <html>
                  <body>
                  <form method="post">
                  <p>Mode:<br /> 
                  <input type="radio" name="mode" value="create"><i>create table</i><br />
                  <input type="radio" name="mode" value="select" checked>select records (can specify id)<br />
                  <input type="radio" name="mode" value="insert">insert 1 record (must specify all)<br />
                  <input type="radio" name="mode" value="delete">delete records (must specify id)<br />
                  <input type="radio" name="mode" value="drop"><i>drop table</i><br />
                  </p>
                  <p>Id: <input type="text" name="id" size=32 maxlength=32 /> (32 hex chars)</p>
                  
                  <p>Latitude: <input type="text" name="lat" size=10 /> (between -90 and 90)</p>
                  <p>Longitude: <input type="text" name="lng" size=10 /> (between -90 and 90)</p>
                  <p>Speed: <input type="text" name="spd" size=10 /> (not negative)</p>
                  <p><input type="submit" value="OK" /></p>
                  </form>
                  </body>
                  </html>
                  

                  推荐答案

                  你也可以包装你的元素而不给它们每个ID,因为一个<label>隐含地用于它包含的输入,如下所示:

                  You can also wrap your elements without giving them each an ID, since a <label> is implicitly for the input it contains, like this:

                  <label>
                     <input type="radio" name="mode" value="create">
                     <i>create table</i>
                  </label>
                  

                  这篇关于通过单击标签来切换 HTML 单选按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  keeping radio buttons checked after form submit(表单提交后保持选中单选按钮)
                  Styling radio button - not work in IE and Firefox(样式单选按钮 - 在 IE 和 Firefox 中不起作用)
                  Bootstrap radio button quot;checkedquot; flag(Bootstrap 单选按钮“已选中旗帜)
                  Javascript how to change radio button label text?(Javascript如何更改单选按钮标签文本?)
                  JavaScript radio button confirmation(JavaScript 单选按钮确认)
                  How can I automatically select specific radio buttons with Greasemonkey?(如何使用 Greasemonkey 自动选择特定的单选按钮?)
                    <bdo id='Mog0T'></bdo><ul id='Mog0T'></ul>
                      <tbody id='Mog0T'></tbody>
                    <tfoot id='Mog0T'></tfoot>

                        <i id='Mog0T'><tr id='Mog0T'><dt id='Mog0T'><q id='Mog0T'><span id='Mog0T'><b id='Mog0T'><form id='Mog0T'><ins id='Mog0T'></ins><ul id='Mog0T'></ul><sub id='Mog0T'></sub></form><legend id='Mog0T'></legend><bdo id='Mog0T'><pre id='Mog0T'><center id='Mog0T'></center></pre></bdo></b><th id='Mog0T'></th></span></q></dt></tr></i><div id='Mog0T'><tfoot id='Mog0T'></tfoot><dl id='Mog0T'><fieldset id='Mog0T'></fieldset></dl></div>

                        <small id='Mog0T'></small><noframes id='Mog0T'>

                      • <legend id='Mog0T'><style id='Mog0T'><dir id='Mog0T'><q id='Mog0T'></q></dir></style></legend>