<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>
解决方案 »
- select控件的横向滚动条
- 在js中 undefined null的区别是什么
- 急 谁能现在帮我看一下导航切换 时间急 在这谢了!!!
- EXT radiogroup
- 要实现这样一个关于table的效果,需要帮忙
- IE 浏览器为什么不会提示错误
- 能不能在javascript中为session变量赋值
- 项目问题,请大家帮助,谢谢!
- ■■请教:jscript里window.open(urlname,'',outerWidth:1000px;outerHeight:5000px;)改变窗口大小参数,不起作用啊,总是默认大小,怎么
- 天地图js搜索路径循环回调问题
- 用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