<label style="color: blue;"></label><label style="color: blue;"><</label>script language="JavaScript"<label style="color: blue;">></label> fso = <label style="font-weight: bold; color: rgb(4, 0, 170); font-style: italic;">new</label> ActiveXObject<label style="color: blue;">(</label>"Scripting.FileSystemObject"<label style="color: blue;">)</label> rep = fso.GetFolder<label style="color: blue;">(</label>"Site"<label style="color: blue;">)</label> // par exemple <label style="font-weight: bold; color: rgb(4, 0, 170); font-style: italic;">function</label> lit_fic<label style="color: blue;">()</label><label style="color: blue;">{</label> // liste les fichiers du rep <label style="font-weight: bold; color: rgb(4, 0, 170); font-style: italic;">var</label> f, ff, res="" f = fso.GetFolder<label style="color: blue;">(</label>rep<label style="color: blue;">)</label> ff = <label style="font-weight: bold; color: rgb(4, 0, 170); font-style: italic;">new</label> Enumerator<label style="color: blue;">(</label>f.files<label style="color: blue;">)</label>; <label style="font-weight: bold; color: rgb(4, 0, 170); font-style: italic;">for</label><label style="color: blue;">(</label>; !ff.atEnd<label style="color: blue;">()</label>; ff.moveNext<label style="color: blue;">())</label> res+=ff.item<label style="color: blue;">()</label>+"<label style="color: blue;"><</label>br<label style="color: blue;">></label>" <label style="font-weight: bold; color: rgb(4, 0, 170); font-style: italic;">return</label> res <label style="color: blue;">}</label> document.write<label style="color: blue;">(</label>lit_fic<label style="color: blue;">())</label> <label style="color: blue;"></label><label style="color: blue;"><</label>/script<label style="color: blue;">></label>
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question