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

 

發佈了52 篇原創文章 · 獲贊 17 · 訪問量 13萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章