<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 单选按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  在开发JS过程中,会经常遇到两个小数相运算的情况,但是运算结果却与预期不同,调试一下发现计算结果竟然有那么长一串尾巴。如下图所示: 产生原因: JavaScript对小数运算会先转成二进制,运算完毕再转回十进制,过程中会有丢失,不过不是所有的小数间运算会
                  问题描述: 在javascript中引用js代码,然后导致反斜杠丢失,发现字符串中的所有\信息丢失。比如在js中引用input type=text onkeyup=value=value.replace(/[^\d]/g,) ,结果导致正则表达式中的\丢失。 问题原因: 该字符串含有\,javascript对字符串进行了转
                  Rails/Javascript: How to inject rails variables into (very) simple javascript(Rails/Javascript:如何将 rails 变量注入(非常)简单的 javascript)
                  quot;Each child in an array should have a unique key propquot; only on first time render of page(“数组中的每个孩子都应该有一个唯一的 key prop仅在第一次呈现页面时)
                  CoffeeScript always returns in anonymous function(CoffeeScript 总是以匿名函数返回)
                  Ordinals in words javascript(javascript中的序数)
                    <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>