sys:treeselect选中变化,js取值

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();

发布了55 篇原创文章 · 获赞 18 · 访问量 13万+

猜你喜欢

转载自blog.csdn.net/world_the_begin/article/details/103418207