asd#zxc.txt</a>" />
开发者

href to asd#zxc.txt (filename contains number sign) with target="_blank" for IE

What I need to put in href for targetting to asd#zxc.txt, tried:

<a href="asd%23zxc.txt" target="_blank">asd#zxc.txt</a>

but IE opens new window with "asd" in URL, this one works fine:

<a href="asd%2开发者_高级运维3zxc.txt">asd#zxc.txt</a>

but I need to open file in new window

Thx

UPD: also tried with JS

window.open("asd%23zxc.txt","_blank")
IE opens new window with "asd" only


you should seriously consider changing your filename. honestly, i've never seen anyone use a # in a filename.

Firefox doesn't work with this either. It opens a new tab with the # in the URL but says that asd doesn't exist.

the only way i can see this working is if you had a PHP script serve the file. something like getfile.php?file=asd#zxc.txt.

even then, you might have to encode the # sign before sending the request to your script (i've never sent a # through POST or GET). also, make sure that you set proper access restrictions on a script like that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜