Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/424.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获取itemLabel表单JSP的值_Javascript_Jsp - Fatal编程技术网

如何使用javascript获取itemLabel表单JSP的值

如何使用javascript获取itemLabel表单JSP的值,javascript,jsp,Javascript,Jsp,如何使用javascript获取itemLabel表单JSP的值 <form:radiobutton path="chosenInstitution" id="institution" itemLabel="${institution.name}" itemValue="${institution.id}"></form:radiobutton> 您可以使用方法获取itemValue的值,如下所示: //获取属性值 var itemValue=document.g

如何使用javascript获取itemLabel表单JSP的值

 <form:radiobutton path="chosenInstitution" id="institution" itemLabel="${institution.name}" itemValue="${institution.id}"></form:radiobutton>

您可以使用方法获取
itemValue的值,如下所示:

//获取属性值
var itemValue=document.getElementById(“机构”).getAttribute(“itemValue”);
//印刷品
console.log(“itemValue=“+itemValue”)
您可以使用方法获取
项值的值,如下所示:

//获取属性值
var itemValue=document.getElementById(“机构”).getAttribute(“itemValue”);
//印刷品
console.log(“itemValue=“+itemValue”)