js多次元配列レンダリングHTML js forループレンダリングページ



微信小プログラム開発交流qq群581478349
微信小プログラムの開発を受けている.スキャンに微信を加える.
     ,        。

 



	
		
		
		
	

	
		<form action="">
			<tbody id="daohang"/>                
		</form>	
	<disable_script type="text/javascript">
		//			    
		 $.ajax({
			type:"get",
			url:"http://***",
			async:true,
			dataType:"json",
			success:function(data){
				console.log(JSON.stringify(data))
				var arr={}; 
				var obj=eval(data);
				var dh='';
				for(i=0;i<obj.length;i++){
					for(j=0;j<obj[i].child.length;j++){
						arr = obj[i].child[j]
					console.log("111:"+JSON.stringify(obj[i]))
					console.log("ww:"+arr.id)
					
					}
                                    if(obj[i].is_show==1){
				    	 var show='  ';
				    }else{
				    	 var show='  ';
				    }				    
					dh+='<ol class="dd-list">';
					dh+='	<li class="dd-item full" data-id="74576">  ';  
					dh+='	   <div class="dd-handle">[ID:'+obj[i].id+'] '+obj[i].title +'<span class="pull-right">  ';  
			        	dh+='          <div class="label label-success" data-toggle="ajaxSwitch" data-switch-value="1">'+show+'</div>        ';  
					dh+='	       <ol class="dd-list">              ';  
					dh+='		 <li class="dd-item full" data-id="74577">      ';  
					dh+='			<div class="dd-handle" style="width:100%;">     ';  
					dh+='				<img src="http://123.207.41.93/jtct/Uploads/'+arr.image_1+'" width="30" height="30" onerror="$(this).remove()"  '; 
					dh+='     style="padding:1px;border: 1px solid #ccc;float:left;" />   [ID: '+arr.id+'] '+arr.title+' <span class="pull-right">';  
			                dh+='                      <div class="label label-success" data-toggle="ajaxSwitch" data-switch-value="'+arr.is_show+'"></div>  </div>       ';  
					dh+='</div>         ';  
					dh+='	</li>       ';  
					dh+='</ol>	    ';  		   
				}
				document.getElementById('daohang').innerHTML=dh;
			},
			error:function(){
				alert('NO');				
			}		
		});	  
	</disable_script>
	
</code></pre>  <pre><code> </code></pre><div class="container-fluid p-0">

                                    <script async
                                            src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3219747971601011"
                                            crossorigin="anonymous"></script>
                                    <!-- jpdebug-blog-source-div -->
                                    <ins class="adsbygoogle"
                                         style="display:block"
                                         data-ad-client="ca-pub-3219747971601011"
                                         data-ad-slot="3872614099"
                                         data-ad-format="auto"
                                         data-full-width-responsive="true"></ins>
                                    <script>
                                        (adsbygoogle = window.adsbygoogle || []).push({});
                                    </script>
                                </div>

                                


                            </div>

                            <div class="row mb-4  pt-4 pb-4"><div class="col-6 text-primary ">
                                    <a class=" btn btn-outline-dark  small  float-left  "
                                       href="/p/1473977">
                                        <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em"
                                             viewBox="0 0 24 24"
                                             fill="none" stroke="currentColor" stroke-width="2"
                                             stroke-linecap="round"
                                             stroke-linejoin="round" class="feather feather-arrow-left">
                                            <line x1="19" y1="12" x2="5" y2="12"></line>
                                            <polyline points="12 19 5 12 12 5"></polyline>
                                        </svg>

                                        Ansible 自作モジュール作成 ~その3:Change要否を判定したい人生~</a>
                                </div><div class="col-6  text-primary ">
                                    <a class=" btn btn-outline-dark small float-right "
                                       href="/p/1473980">tpにおけるM,D,C,A,I,S法
                                        <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em"
                                             viewBox="0 0 24 24"
                                             fill="none" stroke="currentColor" stroke-width="2"
                                             stroke-linecap="round"
                                             stroke-linejoin="round" class="feather feather-arrow-right">
                                            <line x1="5" y1="12" x2="19" y2="12"></line>
                                            <polyline points="12 5 19 12 12 19"></polyline>
                                        </svg>


                                    </a>
                                </div></div>


                        </article>


                    </div>

                    <!-- end row -->
                </div> <!-- end card-body -->
            </div> <!-- end card -->
        </div>
        <!-- end chat area-->

        <!-- start user detail -->
        <div class="col-12 col-xxl-3 col-xl-3 ">

            <div class="card sticky-top" style="top: 20px;">
                <div class="row">


                    <aside class="col-md-12 col-xxl-12 d-none d-md-block   pt-0">
                        <div class="sticky">

                            <div class="container-fluid p-0 m-0 bg-light-off ">
                                <script async
                                        src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3219747971601011"
                                        crossorigin="anonymous"></script>
                                <!-- jpdebug-right-top-1 -->
                                <ins class="adsbygoogle"
                                     style="display:inline-block;width:300px;height:600px"
                                     data-ad-client="ca-pub-3219747971601011"
                                     data-ad-slot="1251860546"></ins>
                                <script>
                                    (adsbygoogle = window.adsbygoogle || []).push({});
                                </script>
                            </div>


                        </div>

                    </aside>

                </div>
                <div class="card-body">


                    <div class="row ">


                        <aside class="col-md-12 col-xxl-12 d-none d-md-block  pt-3">
                            <div class="sticky"><ul id="toc" class="nav flex-column toc overflow-scroll">

                                    <h4 class="nav-link h4 relate_nav_title text-dark" disabled>関連内容</h4><li class="nav-item">
                                        <a data-scroll class="nav-link text-black-50"
                                           href="/p/3361387">WebixはLoadingを表示できるボードをカスタマイズします</a>
                                    </li></ul><!--                                <div class="container-fluid p-0">-->
<!--                                    <script async-->
<!--                                            src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3219747971601011"-->
<!--                                            crossorigin="anonymous"></script>-->
<!--                                    <!– jpdebug-post-right –>-->
<!--                                    <ins class="adsbygoogle"-->
<!--                                         style="display:block"-->
<!--                                         data-ad-client="ca-pub-3219747971601011"-->
<!--                                         data-ad-slot="8535334719"-->
<!--                                         data-ad-format="auto"-->
<!--                                         data-full-width-responsive="true"></ins>-->
<!--                                    <script>-->
<!--                                        (adsbygoogle = window.adsbygoogle || []).push({});-->
<!--                                    </script>-->
<!--                                </div>-->


                            </div>

                        </aside>
                    </div>
                </div> <!-- end card-body -->
            </div> <!-- end card-->
        </div> <!-- end col -->
        <!-- end user detail -->
    </div>


</div><!-- footer -->
<footer class="bg-light p-3 mt-5">
    <div class="container">
        <div class="row gutter-3">

            <div class="col-12 col-md-12 text-white text-center text-lowercase">
                <p class="mb-0 text-black-50 small text-lowercase">©2022 jpdebug.com. All Rights Reserved. | <a
                        href="/privacy" target="_blank" class="text-dark" rel="nofollow">Privacy Policy</a> | <a
                        href="/contact_us"
                        target="_blank"
                        class="text-dark" rel="nofollow">Contact
                    US</a> | <a href="/sitemap.xml" target="_blank" class="text-dark" rel="nofollow">Sitemap</a></p>

            </div>

        </div>
    </div>
</footer>
<!-- / footer -->

<!-- Bootstrap 4 Version -->
<div class="nk-cookie-banner alert alert-secondary text-center mb-0 small" role="alert"
     style="background: rgba(255, 255, 255, .6);border-color:#f2f2f2;-webkit-backdrop-filter: blur(10px);backdrop-filter: blur(20px);">
    🍪このウェブサイトは、あなたが我々のウェブサイトで最高の経験を得ることを確実とするために、クッキーを使います。
    <a href="/privacy" target="blank" rel="nofollow">プライバシー条項の表示</a>
    <button type="button" class="btn btn-primary btn-sm ml-3 shadow-none" onclick="window.nk_hideCookieBanner()">
        同意します
    </button>
</div><!-- JS Global Compulsory hs-builder:build-delete -->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>


<script src="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.2.0/highlight.min.js"></script>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>

<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>

<script src="/static/all_theme_package/quick-website.min.js"></script>

<script src="/static/all_theme_package/cookie-banner.js"></script><script>
    var _hmt = _hmt || [];
    (function () {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?d95bbf01f0dd90da512ecedf1d9661bd";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>

<script async src="//static.getclicky.com/101379076.js"></script>

<!--<script>-->
<!--    $(document).ready(function () {-->

<!--        $("pre").addClass("language-none");-->

<!--    });-->
<!--</script>-->
<script src="/static/all_theme_package/auto-enable-prism.js"></script>
<script src="/static/all_theme_package/prism.min.js"></script></body>

</html><script src="/cdn-cgi/scripts/7d0fa10a/cloudflare-static/rocket-loader.min.js" data-cf-settings="eb7bc2c138fe3552a5181c07-|49" defer></script>