voilà j'ai un javascript, d'une façon il n'est que visible par IE :
Code : Tout sélectionner
var snowsrc="http://perso.wanadoo.fr/discret/snow.gif"
var no = 15;
var ns4up = (document.layers) ? 1 : 0;
var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 600;
if (ns4up||ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
Code : Tout sélectionner
var ns4up=(document.layers)?1:0;
var ie4up=(document.all && !w3c)?1:0;
var ns6up = (document.getElementById) ? 1 : 0;
var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 600;
if (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
else if (ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight; }
