2011-12-24 73 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我做了这些修补程序,然后你的代码工作正常

相关问题