0

別の HTML ページに含めたい HTML のコードがたくさんあります。独自のカスタム タグを作成し、それをターゲット HTML ページに含めることで、これを行うことはできますか? いいえの場合、どのような選択肢がありますか?

例えば、

<sample-tag /> <!-- contains another set of HTML code -->

ありがとう。

4

1 に答える 1

1

コピー元:こちら

a.html

<html> 
  <head>  
    <script> 
    $(function(){
      $("#includedContent").load("b.html"); 
    });
    </script> 
  </head> 

  <body> 
     <div id="includedContent"></div>
  </body> 
</html>

b.html

<p> This is my include file </p>
于 2013-08-19T08:48:10.333 に答える