js数组嵌套


<script src="/wedding/data/enums/nativeplace.js" language="javascript" type="text/javascript"></script>	
                
                
                {dede:datalist}
                <ul>
                <input type="hidden" id="nativeplacesss_{dede:key/}" value="{dede:field.nativeplace/}" />
                <!--<input type="hidden" id="nativeplacesss" value="{dede:field.nativeplace/}" />-->
                <input type="hidden" name="city_ids[]" value="citys_{dede:key/}" />
	<li class="zf_dd" id="citys_{dede:key/}"></li>
	<li class="zf_bt"><a href="">{dede:field.title/}</a>
              </li>
               <script language="javascript">
			function city(id,ids) {
				var b = document.getElementById(id).value;
					if (b != 0) {
					var a = em_nativeplaces[b];
					document.getElementById(ids).innerHTML = a;
					}else{
					document.getElementById(ids).innerHTML = "未知";
					}
					}
				city('nativeplacesss_{dede:key/}','citys_{dede:key/}')
					 </script>
					<li class="zf_lx"><a href="">住宅公寓</a></li>
					<li class="zf_zt">投标中</li>
					<li class="zf_cz">查看</li>
			</ul> 

Leave a Reply

(will not be published)