我的页面上有一个链接,可下载PDF文件,但是当他们单击任一下载链接后,我想将它们带到另一页。
页面为他们提供了选择下载文件的2种选择之一,但我只希望允许他们做出选择,然后退出到另一页面。
我的代码如下:
<div class="columns medium-6">
<h3 class="text-center">7 Tips for Creating a <br />Happy Workplace</h3> <img src="https://www.maylake.com.au/_assets/images/mini-guide/bookcover-7-tips-workplace.png" height="250px" alt="7 Tips for Creating a Happy Workplace eBook">
<p style="font-size: 18px;" class="text-center">Discover how you can make your workplace a healthier environment by simply making being a happy place to work for everyone</p>
<div class="choose">
<input type="radio" name="choice-books" id="choice-7-tips">
<label>I would like to receive a copy of the eBook</label>
<div class="reveal-if-active">
<p class="text-center"><a href="/LiteratureRetrieve.aspx?ID=192014" class="button radius text-center">DOWNLOAD Now</a> </p>
</div>
</div>
</div>
<div class="columns medium-6">
<h3 class="text-center">Your Short Guide to Leasing a Commercial Office Space</h3> <img src="https://www.maylake.com.au/_assets/images/mini-guide/bookcover-leasing-commercial-office.png" alt="Guide to Leasing Commercial Office" height="250">
<p style="font-size: 18px;" class="text-center">Understand what you should be considering before leasing any commercial office space. Being forewarned and prepared could save you lots
of money and grief</p>
<div class="choose">
<input type="radio" name="choice-books" id="choice-leasing">
<label for="choice-leasing">I would like to receive a copy of the eBook</label>
<div class="reveal-if-active">
<p class="text-center"><a href="/LiteratureRetrieve.aspx?ID=192012" class="button radius text-center">DOWNLOAD Now</a> </p>
</div>
</div>
</div>
答案 0 :(得分:1)
我会将您的a
元素更改为以下内容:
<a target="_blank" href="/LiteratureRetrieve.aspx?ID=192014" class="button radius text-center" onclick="window.location='http://google.com';">DOWNLOAD Now</a>
这将使他们在下载pdf的同时将他们带到google.com。