加载 URL + JavaScript 动作
我试图让我的用户从我的网站下载 bungie.net 的“地图”。
示例地图:
http://www.bungie.net/Online/Halo3UserContentDetails.aspx?h3fileid=31604914
用户需要单击链接才能下载地图:
<a id="ctl00_mainContent_xboxDownloadButton" href="javascript:__doPostBack('ctl00$mainContent$xboxDownloadButton','')">Download to Halo 3</a>
当用户单击此链接时,地图将下载到用户的 Xbox 360 上。
选项 1:
我尝试打开隐藏的 iframe
然后,当用户单击链接时,JavaScript 将加载到我的 iframe
中。从而下载地图。唯一的问题是它不起作用。
> <iframe name="download_frame"
> src="http://www.bungie.net/Online/Halo3UserContentDetails.aspx?h3fileid=1244"
> width="0px" height="0px"></iframe> <a
> href="javascript:__doPostBack('ctl00$mainContent$xboxDownloadButton','')"
> target="download_frame">Download</a>
选项 2:
是否可以有一个带有 src
的链接,如下所示...
URL + JavaScript
选项 3:
有关如何获取的任何其他建议用户无需访问该网站即可下载此地图,这会很棒。
I'm trying to get my users to download "maps" from bungie.net from my website.
Example map:
http://www.bungie.net/Online/Halo3UserContentDetails.aspx?h3fileid=31604914
Link users need to click to download map:
<a id="ctl00_mainContent_xboxDownloadButton" href="javascript:__doPostBack('ctl00$mainContent$xboxDownloadButton','')">Download to Halo 3</a>
When a user clicks this link the map is downloaded to the users Xbox 360.
Option 1:
I tried opening a hidden iframe
then when the user clicks on a link JavaScript will load into my iframe
. Thus downloading the map. The only problem is it doesn't work.
> <iframe name="download_frame"
> src="http://www.bungie.net/Online/Halo3UserContentDetails.aspx?h3fileid=1244"
> width="0px" height="0px"></iframe> <a
> href="javascript:__doPostBack('ctl00$mainContent$xboxDownloadButton','')"
> target="download_frame">Download</a>
Option 2:
Is it possible to have a link with a src
something like this...
URL + JavaScript
Option 3:
Any other suggestions of how to get users to download this map without having to go to this website would be great.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道这是否有效......它应该被视为伪代码,因为我没有在进行过程中测试它,但可能会有所帮助。
拥有一个标准 HTML 页面用作 IFRAME 怎么样,我们称之为“dl.html”
在 dl.html 中包含以下 Javascript:
在您的父 HTML 页面中,包含以下内容:
希望有所帮助,或激发一些神经元...
I don't know if this will work... it should be treated as pseudo-code as I'm not testing this as I go along but might help.
How about having a standard HTML page for use as an IFRAME, lets call it "dl.html"
Within dl.html have the following Javascript:
In your parent HTML page, have this:
Hope that helps, or fires some neurons...