2011-12-24 32 views
0

我想在一個頁面上有三個移動頁面,並且有三個按鈕鏈接在它上面。它使我的移動網站看起來更乾淨。這是我的代碼:鏈接單個頁面上的多個按鈕

<?php include("config.php"); ?> 
<?php include("head.php"); ?> 


<!-- Start of Index --> 
<div data-role="page" id="Index" data-theme="a"> 

    <div data-role="header"> 
     <h1><?php echo $businessname; ?> Contact Index</h1> 
    </div><!-- /header --> 

    <div data-role="content"> 
     <div data-role="controlgroup"> 
<a href="#yes" data-role="button">Yes</a> 
<a href="#no" data-role="button">No</a> 
<a href="#maybe" data-role="button">Maybe</a> 
</div> 

    </div><!-- /content --> 

    <div data-role="footer"> 
     <h4>Page Footer</h4> 
    </div><!-- /header --> 
</div><!-- /page --> 


<!-- Start of Yes --> 
<div data-role="page" id="yes" data-theme="a"> 

    <div data-role="header"> 
     <h1>Bar</h1> 
    </div><!-- /header --> 

    <div data-role="content"> 
     <p>I'm first in the source order so I'm shown as the page.</p>  
     <p><a href="#email">Back to foo</a></p> 
    </div><!-- /content --> 

    <div data-role="footer"> 
     <h4>Page Footer</h4> 
    </div><!-- /header --> 



<!-- Start of No--> 
<div data-role="page" id="no" data-theme="a"> 

    <div data-role="header"> 
     <h1>Bar</h1> 
    </div><!-- /header --> 

    <div data-role="content"> 
     <p>I'm first in the source order so I'm shown as the page.</p>  
     <p><a href="#foo">Back to foo</a></p> 
    </div><!-- /content --> 

    <div data-role="footer"> 
     <h4>Page Footer</h4> 
    </div><!-- /header --> 



    <!-- Start of Maybe --> 
<div data-role="page" id="maybe" data-theme="a"> 

    <div data-role="header"> 
     <h1>Bar</h1> 
    </div><!-- /header --> 

    <div data-role="content"> 
     <p>I'm first in the source order so I'm shown as the page.</p>  
     <p><a href="#foo">Back to foo</a></p> 
    </div><!-- /content --> 

    <div data-role="footer"> 
     <h4>Page Footer</h4> 
    </div><!-- /header --> 





</div><!-- /page --> 

現在只有一個鏈接到頁面,其餘不是。我已經做了大量的搜索,並從我的理解你需要鏈接到您的內部網頁與#yes #no #maybe ...我在這裏錯過了什麼?

+0

對不起,我上傳的代碼錯誤,我現在已經上傳的代碼,我有問題 – 2011-12-24 10:31:18

回答

0

我覺得你的問題是,你需要的#yes #NO等爲您的頁面上的標籤<a name="no"></a>你擁有了它具有<div id="no">

你也有一些未關閉的標籤<div>

0

你沒有關閉頁面divs爲「是」和「否」。

href="#foo"href="#email"不存在。你想回到索引頁嗎? 如果是這樣,只是這

<a href="#" data-rel="back">Back to foo</a> 

更換#foo#email我做了這些修補程序,然後你的代碼工作正常

相關問題