-5

私はindex.htmlを持っています.ボタンをクリックして残りのHTMLファイルをロードしたいDIVがあります.ここに例があります.Googleで ここに画像の説明を入力
見つけた多くの例を試しましたが、どれもそれらは働いています。ここに私が使用した最後のコードがあります:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"     "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>  

<script src="jquery/reflection.js" type="text/javascript" charset="UTF-8"></script>
<script src="jquery/jquery-1.10.1.min.js" type="text/javascript" charset="UTF-8">  </script>
<link rel="StyleSheet" href="css/css.css" media="all" type="text/css">

<script type="text/javascript">
    function change(page) {
        $("#content").load(page);
    }
</script>

</head>
<body>  

<div id="cabecera">
    <a href="javascript:change('contacto.html');"><button style="float:right; margin-right:49px;" type="button" name="btn_der" value="" class="menu_principal" id="btn_der">CONTACT</button></a>
    <button style="float:right;" type="button" name="" value="" class="menu_principal">PRODUCTS</button>
    <button style="float:right;" type="button" name="" value="" class="menu_principal" id="btn_izq">HOME</button>
</div>

<div id="cuerpo">
    <div id="content"></div> <!--This is the one where rest of html file should be loaded -->

<div id="tablet" class="reflect">
    <img src="imagenes/tablet.png" class="reflect">
</div>

</div>


</body>
</html>


一方、index.html HOME ボタンを最初にロードしたときに、アクティブな状態で表示される可能性はありますか?? 助けていただければ幸いです。どうもありがとう。

4

3 に答える 3