<BODY>
<input type=text id=text1 name=text1>
<input type=button id=button2 name=button2 value=download onClick="foo()">
<script>
function foo(){
window.open(text1.value);
}
</script></BODY>
<input type=text id=text1 name=text1>
<input type=button id=button2 name=button2 value=download onClick="foo()">
<script>
function foo(){
window.open(text1.value);
}
</script></BODY>
解决方案 »
- 多个按钮怎么操作
- 谁能帮我解释下这句js啥意思
- 做一个新浪这样的黄道查询系统要多少钱啊?
- 我的ie不能看到flash,使用swfobject.js编辑的网页
- 取指定元素的子元素怎么会多出来好多个呢?
- <iframe>在网页上如何显示的内容是平面,一般是凹下去的
- 用纯HTML语法在一个HTML页面中引入其它HTML页面?
- 如何让提醒信息显示出来?
- window.open 能传参数吗 如:PostNew.asp?user_id=<%=user_id%>
- 关于<img src="images/*.gif" width="229" height="103" usemap="#Map" border="0">
- 用javascript调用客户端时间问题!!!
- 高手们帮忙看一下这段程序,问题很菜,但我不知道怎么回事!请教
<input type=text id="URL" value="about:blank">
<input type=button onclick="document.all.DownPage.src=document.all.URL.value;var parent=document.all.DownPage;parent.document.execCommand('SaveAs');">
<br>
<iframe src="http://digitaltitan/" id="DownPage">
</ifame>
只能是下载本地的.不能跨域.
如果要跨域的话,你可以用xmlhttp.<script>
function getimg(url) {
show.window.location.href=url;
timer=setInterval(checkload,100)
}
function checkload(){
if(show.readyState!="complete")
{show.document.execCommand("SaveAs");
clearInterval(timer)}
}</script>
<img src="aspplus2.gif">
<input type=text name=url>
<input type=button value="Down" onClick="getimg(document.all.url.value)">
<iframe src="" name=show style="width:0;height:0"></iframe>
http://www.dnsasp.com/2939.html