jsp源码:
<div class="control-group" id="categoryShow">
<label class="control-label">分类:</label>
<div class="controls">
<sys:treeselect id="categoryInfo" name="categoryInfo.id" value="${categoryInfo.id}" labelName="categoryInfo.name" labelValue="${categoryInfo.name}"
title="分类" url="/categoryinfo/categoryInfo/treeData" cssClass="required" notAllowSelectParent="true" selectRequired="true" allowClear="true"/>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
选中后的代码变化:
<div class="controls">
<div class="input-append">
<input id="categoryInfoId" class="required" name="categoryInfo.id" value="bf077b907a494205a270e6498683884d" type="hidden">
<input id="categoryInfoName" class="required" name="categoryInfo.name" readonly="readonly" value="恐怖电影" required="" style="" type="text">
<a id="categoryInfoButton" class="btn " href="javascript:" style="">
</div>
js取值:
var categoryInfo=$("#categoryInfoId").val();