标签: radio-button

如何检查jQuery中是否检查了每个组中的单选按钮?

多个组或单选按钮

<h1>Question 1</h1>
<input type="radio" name="radio1" value="false" />
<input type="radio" name="radio1" value="true" /> 

<h1>Question 2</h1>
<input type="radio" name="radio2" value="false" />
<input type="radio" name="radio2" value="true" />
Run Code Online (Sandbox Code Playgroud)

如何检查jQuery是否检查了每个组中的单选按钮?

谢谢.

jquery jquery-selectors radio-button

19
推荐指数
1
解决办法
2万
查看次数

在Android中制作带有图像的RadioGroup单选按钮......怎么样?

是否可以在Android中制作单选按钮,其中有按钮而不是常规按钮的图像表示?我希望它看起来像这样:

在此输入图像描述

中间的青色表示所选按钮.

我该怎么做?

android radio-group radio-button

19
推荐指数
1
解决办法
2万
查看次数

Android:自定义列表视图中的单选按钮

我正在开发一个应用程序,我需要在列表视图中实现单选按钮.我想实现一个列表视图,每行有一个单选按钮和两个文本视图.列表视图下方有一个"确定"按钮.

我所做的是创建了一个列表视图和一个自定义适配器.listview的代码如下:

<ListView
    android:id="@+id/listview"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:cacheColorHint="#00000000"
    android:overScrollMode="never"
    tools:ignore="NestedScrolling"
    android:choiceMode="singleChoice" >
</ListView>
Run Code Online (Sandbox Code Playgroud)

我创建了一个自定义适配器布局:

<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <TableRow
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        tools:ignore="UselessParent" >

        <RadioButton
            android:id="@+id/radiobutton"
            android:layout_width="0sp"
            android:layout_height="wrap_content"
            android:layout_weight=".1" />

        <TextView
            android:id="@+id/textview1"
            android:layout_width="0sp"
            android:layout_height="wrap_content"
            android:layout_weight=".3" />

        <TextView
            android:id="@+id/textview2"
            android:layout_width="0sp"
            android:layout_height="wrap_content"
            android:layout_weight=".3" />

    </TableRow>

</TableLayout>
Run Code Online (Sandbox Code Playgroud)

片段的java代码如下:

ListView listView = (ListView) view.findViewById(R.id.listview);

// values is a StringArray holding some string values.
CustomAdapter customAdapter = new CustomAdapter (getActivity(), values);
listView.setAdapter(customAdapter );
listView.setOnItemClickListener(this);

@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int …
Run Code Online (Sandbox Code Playgroud)

android radio-button android-layout android-listview android-adapter

19
推荐指数
1
解决办法
6万
查看次数

烧瓶手柄形式与单选按钮

index.html看起来像这样

<form name="myForm" action="" method="post" onsubmit="">
<p>
<input type="radio" name="options" id="option1"> Option1 <br>
<input type="radio" name="options" id="option2"> Option2 <br>
<input type="radio" name="options" id="option3"> Option3 <br>
</p>
<p><input type=submit value=Next></p>
</form>
Run Code Online (Sandbox Code Playgroud)

我需要选择按钮.但由于他们都有相同的名字,我不能写作request.form['option'].如果我的名字不同,用户可以进行多项选择.

难道没有办法通过它的id来获取按钮的状态吗?如果不是,处理这种形式最简单的方法是什么?

radio-button flask python-3.x

19
推荐指数
2
解决办法
2万
查看次数

WPF中的数据绑定单选按钮列表

我有一个数据对象的选项列表,我想使用一个单选按钮列表,以允许用户选择一个,只有一个.功能类似于数据绑定组合框,但采用单选按钮格式.

愚蠢的我,我以为这将是内置的,但没有.你怎么做呢?

wpf databound radio-button

18
推荐指数
4
解决办法
3万
查看次数

如何在没有表单的情况下循环显示单选按钮组?

如何在JavaScript或jQuery中没有表单的情况下循环单选按钮组?

html javascript jquery radio-button

18
推荐指数
2
解决办法
4万
查看次数

如何在preference.xml窗口中创建RadioButton组?

我是Java Android开发的初学者.我正在使用Eclipse SDK 3.6.1版本.我有一个带有两个复选框和一个后退按钮的首选项窗口.

    <?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
             <PreferenceCategory
             android:title="PIN requirement">                
            <CheckBoxPreference                        
                    android:title="Use PIN" 
                    android:defaultValue="true"                                              
                    android:key="checkboxPref" /> 
           <CheckBoxPreference
                    android:title="Don't use PIN"
                    android:defaultValue="false"                        
                    android:key="checkboxPref2" />

                    </PreferenceCategory>

<PreferenceCategory>
    <Preference
            android:title="Back"                
            android:key="customPref" />
    </PreferenceCategory>
</PreferenceScreen>
Run Code Online (Sandbox Code Playgroud)

如何将两个CheckBox更改为RadioButton组?

xml checkbox android preferences radio-button

18
推荐指数
3
解决办法
4万
查看次数

WinForm绑定单选按钮

我使用VS2010,然后将Member datagridview拖放到设计视图中.之后,我将名称成员文本字段拖放到设计视图,然后尝试编辑和保存.它运作正常.

然后我拖放性别单选按钮来设计视图.但绑定它不起作用.

我怎么能在这种情况下绑定?

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Test7
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void memberBindingNavigatorSaveItem_Click(object sender, EventArgs e)
        {
            this.Validate();
            this.memberBindingSource.EndEdit();
            this.tableAdapterManager.UpdateAll(this.dbDataSet);

        }

        private void Form1_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'dbDataSet.Member' table. You can move, or remove it, as needed.
            this.memberTableAdapter.Fill(this.dbDataSet.Member);
            // TODO: This line of code …
Run Code Online (Sandbox Code Playgroud)

c# data-binding datagridview radio-button winforms

18
推荐指数
1
解决办法
2万
查看次数

无线电组onclick事件未触发,我该如何判断哪个被选中?

我正在使用无线电组,但RadioGroup onClick事件未触发,方法getCheckedRadiobuttonID()正在返回null.这是我布局中的元素:

   <RadioGroup
            android:id="@+id/RG1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:onClick="onRGClick" >
Run Code Online (Sandbox Code Playgroud)

方法

public void onRGClick(View v) {
    Toast.makeText(this, "Test ", 1000).show();
}
Run Code Online (Sandbox Code Playgroud)

android radio-button

18
推荐指数
2
解决办法
3万
查看次数

用css隐藏检查单选按钮

我想知道是否可以使用css隐藏已选中的单选按钮:

  { display:none; }
Run Code Online (Sandbox Code Playgroud)

我不知道如何解决这个问题.选中的单选按钮始终显示"无",这对用户没有任何意义,我希望隐藏它.这可能吗?谢谢你的指针.

css radio-button

18
推荐指数
4
解决办法
7万
查看次数