从动态创建的复选框中获取值 [英] Get values from dynamically created check boxes

查看:87
本文介绍了从动态创建的复选框中获取值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我正在用PHP编写在线测试脚本。对于每种问题类型(例如,复选框类型),问题和选项都是动态创建的(表中的选项值。



下面给出了创建复选框的代码供您参考

Hello,

I am writing an online test script in PHP.For each question type(say ,checkbox type),the question and options are created dynamically(option values from table).

The code for creating checkboxes are given below for your reference

echo "<table><tbody><tr><td><input class=\"radclick\"  type=\"checkbox\" data-role=\"none\" style=\"text-align:justify\" value=\"$value\" id=\"$question_id\" name=\"question_id[$question_id][]\">$value</td></tr></tbody></table><br />";





我必须得到的值候选人使用jquery选择的选项,需要创建用于存储问题ID和点击选项的cookie。



任何人请他我来解决这个问题。



提前谢谢。



I have to get the values of options selected by the candidates using jquery and need to create cookies for storing the question id and options clicked.

Anyone please help me to solve this.

Thanks in advance.

推荐答案

value \id = \\ \\
value\" id=\"


question_id \name = \question_id
question_id\" name=\"question_id


question_id] [] \>
question_id][]\">

这篇关于从动态创建的复选框中获取值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆