Android Eclipse PhoneGap HTML div链接是';行不通
我目前正在PhoneGap上制作一个android应用程序,在链接图像时遇到了麻烦,所以一旦点击它,用户就会转到同一页面上的另一个div,我不想仅仅为了一点点javascript就制作另一个HTML文件。当我在android emulator中测试它时,这个链接似乎不起作用,好像我把它的链接改成index.html一样。任何帮助都会很棒Android Eclipse PhoneGap HTML div链接是';行不通,android,eclipse,cordova,html,Android,Eclipse,Cordova,Html,我目前正在PhoneGap上制作一个android应用程序,在链接图像时遇到了麻烦,所以一旦点击它,用户就会转到同一页面上的另一个div,我不想仅仅为了一点点javascript就制作另一个HTML文件。当我在android emulator中测试它时,这个链接似乎不起作用,好像我把它的链接改成index.html一样。任何帮助都会很棒 <div data-role="page" id="workpage"> <div data-role="header"> &l
<div data-role="page" id="workpage">
<div data-role="header">
<h1>Work</h1>
</div>
<div data-role="content">
<div data-role="navbar">
<a href="index.html">Back</a>
</div>
<a href="#work1"><img src="work/example1.png" id="content"></a>
<div data-role="navbar">
<a href="index.html">Back</a>
</div>
<div data-role="footer">
<h4>© 2013 Nick Willcox</h4>
</div>
</div>
<div data-role="page" id="work1">
<div data-role="header">
<h1>Work</h1>
</div>
<div data-role="content">
<div data-role="navbar">
This was the first website I created, its purpose was to be a small business card which shown a little information about myself. I used HTML4, Photoshop and CSS.
<a href="work.html">Back</a>
</div>
</div>
<div data-role="footer">
<h4>© 2013 Nick Willcox</h4>
</div>
工作
©2013年Nick Willcox
工作
这是我创建的第一个网站,它的目的是做一张小名片,上面显示了一些关于我自己的信息。我使用了HTML4、Photoshop和CSS。
©2013年Nick Willcox
任何帮助都会很棒。执行滚动的代码在哪里
<div data-role="page" id="workpage">
<div data-role="header">
<h1>Work</h1>
</div>
<div data-role="content">
<div data-role="navbar">
<a href="index.html">Back</a>
</div>
<a href="#work1"><img src="work/example1.png" id="content"></a>
<div data-role="navbar">
<a href="index.html">Back</a>
</div>
<div data-role="footer">
<h4>© 2013 Nick Willcox</h4>
</div>
</div>
<div data-role="page" id="work1">
<div data-role="header">
<h1>Work</h1>
</div>
<div data-role="content">
<div data-role="navbar">
This was the first website I created, its purpose was to be a small business card which shown a little information about myself. I used HTML4, Photoshop and CSS.
<a href="work.html">Back</a>
</div>
</div>
<div data-role="footer">
<h4>© 2013 Nick Willcox</h4>
</div>
看一看,它解释了如何滚动到一个元素
编辑
我不知道你所说的“以div为链接”是什么意思。div不是链接,加载div是什么意思
如果要使用javascript打开另一个链接,可以使用:
window.location = http:\\www.google.com
进行滚动的代码在哪里 看一看,它解释了如何滚动到一个元素 编辑 我不知道你所说的“以div为链接”是什么意思。div不是链接,加载div是什么意思 如果要使用javascript打开另一个链接,可以使用:
window.location = http:\\www.google.com
如果你的图像和div在同一个页面上,当用户点击图像时,你应该滚动到你想要显示的div,对吗?或者我不理解你的问题。我想你误解了,在PhoneGap中,它应该像普通链接一样加载div。它实际上只是单击链接,它会像一个全新的窗口一样打开,完全没有滚动如果你的图像和你的div在同一页上,当用户单击图像时,您应该滚动到要显示的div,对吗?或者我不理解你的问题。我想你误解了,在PhoneGap中,它应该像普通链接一样加载div。