如果文件存在 [英] if file exist
问题描述
如何检查当前目录中是否存在文件(在javascript中)?
-
pozdr;)
zhisol
how can i check if file exist in current directory (in javascript)?
--
pozdr;)
zhisol
推荐答案
文章< Xn ********************** **@195.136.250.206>, zh****@o2.pl
启发我们with ...
In article <Xn************************@195.136.250.206>, zh****@o2.pl
enlightened us with...
如何检查当前目录中是否存在文件(在javascript中)?
how can i check if file exist in current directory (in javascript)?
这不是'在正常的安全状态下,普通的JS真的可以实现这种环境。
你的意思是在服务器上还是在客户端上?
这是用于网页还是内联网应用程序,CD-ROM等......?
-------------------- -----------------------------
~kaeli~
嘿,如果你有它炫耀它!如果你不这样做,那就盯着那个做某事的人。只是不要舔电视屏幕,
它会留下条纹。
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------- -----------------------
This isn''t really possible with normal JS in a normal security
environment.
Did you mean on the server or on the client?
Is this for a web page or an intranet application, CD-ROM, etc...?
-------------------------------------------------
~kaeli~
Hey, if you got it flaunt it! If you don''t, stare
at someone who does. Just don''t lick the TV screen,
it leaves streaks.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------------------------------
kaeli< in ******** ************@NOSPAMatt.net>写在
新闻:MP ************************ @ nntp.lucent.com:
kaeli <in********************@NOSPAMatt.net> wrote in
news:MP************************@nntp.lucent.com:
在正常的安全环境中使用普通JS是不可能的。
你的意思是在服务器上还是在客户端上?
是这适用于网页或内联网应用程序,CD-ROM等......?
This isn''t really possible with normal JS in a normal security
environment.
Did you mean on the server or on the client?
Is this for a web page or an intranet application, CD-ROM, etc...?
用于网页。我的意思是:
if(cover.jpg存在)
document.write(''< img src =''封面。 jpg''>'')
其他
//什么都不显示
我也不知道怎么能我意识到if(" cover.jpg存在)"
例如我有地址: http://mysite.com/show.html
并且如果在服务器上的root中是文件cover.jpg ,使这个可见,
否则不是。
通常在html中如果cover.jpg不存在 - 客户端看到空盒子,但是
i希望他什么都看不见
ps:对不起我的英语:)
-
pozdr;)
zhisol
it''s for web page. i mean exactly that:
if("cover.jpg" exist)
document.write(''<img src=''cover.jpg''>'')
else
//display nothing
and i don''t know how can i realise "if("cover.jpg" exist)"
for example i have address: http://mysite.com/show.html
and if in root on server is a file "cover.jpg", make this visable,
otherwise not.
normally in html if "cover.jpg" doesn''t exist - client see empty box, but
i want that he''ll see nothing
ps: sorry for my english:)
--
pozdr;)
zhisol
文章< Xn ** **********************@195.136.250.206> ;, zh ** **@o2.pl
说...
In article <Xn************************@195.136.250.206>, zh****@o2.pl
says...
如何检查当前目录中是否存在文件(在javascript中)?
how can i check if file exist in current directory (in javascript)?
您是否拥有服务器端JavaScript或带JavaScript设施的ASP?
如果您这样做,请查看 http://www.4guysfromrolla.com/
-
Hywel我不吃乳蛋饼
http://hyweljenkins.co.uk/
http://hyweljenkins.co.uk/mfaq.php
Do you have server-side JavaScript or ASP with JavaScript facilities?
If you do, have a look at http://www.4guysfromrolla.com/
--
Hywel I do not eat quiche
http://hyweljenkins.co.uk/
http://hyweljenkins.co.uk/mfaq.php
这篇关于如果文件存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!