Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/412.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何在单选按钮中发布值并在数据库中显示可用值?_Javascript_Html_Django_Ajax - Fatal编程技术网

Javascript 如何在单选按钮中发布值并在数据库中显示可用值?

Javascript 如何在单选按钮中发布值并在数据库中显示可用值?,javascript,html,django,ajax,Javascript,Html,Django,Ajax,var countemp=1 **i have create dynamic multiple radio button in pair of two in table.i want to show the available value in database value are in true false and i also want when user change value it's update database value.** $(“div#empu文件夹”).show(

var countemp=1

**i have create dynamic multiple radio button in pair of two in table.i want to show the available value in database value are in true false and i also want when user change value it's update database value.**  
$(“div#empu文件夹”).show()

如果(需要删除v.trim()='T'){ `html_emptb+=“”;' } 否则{ html_emptb+=“”;}

单选按钮块 如果(statusemp_v.trim()='T') { html_emptb+=“已收到
未收到”;} 其他的 { html_emptb+=“已收到
+countemp+“'class='with-gap radio col'checked/>未收到”;
}
html_emptb+=“”+itemname emp_v+“”;
html_emptb+=“”;
html_emptb+=“”;
}

$(“”)html(html_emptb).appendTo(“#id_emp”);
}); 
这是HTML部分

$("<tr/>").html(html_emptb).appendTo("#id_emp");
                    }); 

您可以尝试提供更多信息和一些代码,以便我们了解您试图做什么,并可能提供帮助。没有足够的信息可以尝试。请立即尝试
countemp += 1;
for='id_empreceived_n" +countemp+"'>Not Received</label>    </td>";
                                 }

html_emptb +=" <td>" + itemnameemp_v + "</td>" ;



html_emptb +="<td><input type='hidden' name='hid_Empitemid_v' id='id_hid_Empitemid_v' value='" + itemidemp_v + "' /></td>";



html_emptb +="<td><textarea rows='2' class='form-control' name='emp_check' id='id_empcheck' value='" + remarksemp_v + "' > </textarea> </td>" ;
$("<tr/>").html(html_emptb).appendTo("#id_emp");
                    }); 
<p>
    <label><input class="rd" type="radio" name="gender" value="male">Male</label>
    <label><input class="rd" type="radio" name="gender" value="female">Female</label>
</p>
<p><input id="btn" type="button" value="Get Value"></p>
$(document).ready(function() {
    $("#btn").click(function() {
        var radioValue = $(".rd:checked").val();
        if (radioValue) {
            alert("Your are a " + radioValue);
        };
    });
});