Script pour souris
waleNz-
Messages postés
67
Statut
Membre
-
Utilisateur anonyme -
Utilisateur anonyme -
Bonjour,
J'ai un script pour souris :
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document sans nom</title>
<STYLE type="text/css" id="style1">
<!--
a:link {
color: #996666;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #990000;
}
a:hover {
text-decoration: none;
color:#00CCCC
}
a:active {
text-decoration: none;
color:#CCCCFF
}
</STYLE>
<STYLE id="style2" >
<!--
a:link {
color: #0000FF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color:#6633FF
}
a:hover {
text-decoration: none;
color:#FFFFFF
}
a:active {
text-decoration: none;
color:#99CC00
}
</STYLE>
</head>
<body>
<script language="javascript" type="text/javascript">
function bouton(e) {
if (navigator.appName == 'Microsoft Internet Explorer'){
if (event.button==1){getelementbyid("style1");}
else if (event.button==2){getelementbyid("style2");}
}
if (navigator.appName == 'Netscape'){
if (e.which==1){getelementbyid("style1");}
else if (e.which==3){getelementbyid("style2");}
}
}
window.onmousedown=bouton;
document.onmousedown=bouton;
document.captureEvents(Event.MOUSEDOWN);
</script>
<a href=http://www.tonsite.com onmousedown()='bouton'>hello</a>
</body>
Ou dois-je le mettre ?
Merci de vos réponse
Cordialement,
J'ai un script pour souris :
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document sans nom</title>
<STYLE type="text/css" id="style1">
<!--
a:link {
color: #996666;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #990000;
}
a:hover {
text-decoration: none;
color:#00CCCC
}
a:active {
text-decoration: none;
color:#CCCCFF
}
</STYLE>
<STYLE id="style2" >
<!--
a:link {
color: #0000FF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color:#6633FF
}
a:hover {
text-decoration: none;
color:#FFFFFF
}
a:active {
text-decoration: none;
color:#99CC00
}
</STYLE>
</head>
<body>
<script language="javascript" type="text/javascript">
function bouton(e) {
if (navigator.appName == 'Microsoft Internet Explorer'){
if (event.button==1){getelementbyid("style1");}
else if (event.button==2){getelementbyid("style2");}
}
if (navigator.appName == 'Netscape'){
if (e.which==1){getelementbyid("style1");}
else if (e.which==3){getelementbyid("style2");}
}
}
window.onmousedown=bouton;
document.onmousedown=bouton;
document.captureEvents(Event.MOUSEDOWN);
</script>
<a href=http://www.tonsite.com onmousedown()='bouton'>hello</a>
</body>
Ou dois-je le mettre ?
Merci de vos réponse
Cordialement,
A voir également:
- Script pour souris
- Quelle touche pour débloquer la souris ? - Guide
- Script vidéo youtube - Guide
- Mas script - Accueil - Windows
- Souris ordinateur - Guide
- Pointeur souris - Guide
15 réponses
il faut mètre sa entre les balise <head> de ton site :<STYLE type="text/css" id="style1">
<!--
a:link {
color: #996666;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #990000;
}
a:hover {
text-decoration: none;
color:#00CCCC
}
a:active {
text-decoration: none;
color:#CCCCFF
}
</STYLE>
<STYLE id="style2" >
<!--
a:link {
color: #0000FF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color:#6633FF
}
a:hover {
text-decoration: none;
color:#FFFFFF
}
a:active {
text-decoration: none;
color:#99CC00
}
</STYLE>
Et sa entre les balise <body>
comme sait fait mais si tu copie et colle directement tous ton code dans ton site il risque di avoir des problème ^^
<!--
a:link {
color: #996666;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #990000;
}
a:hover {
text-decoration: none;
color:#00CCCC
}
a:active {
text-decoration: none;
color:#CCCCFF
}
</STYLE>
<STYLE id="style2" >
<!--
a:link {
color: #0000FF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color:#6633FF
}
a:hover {
text-decoration: none;
color:#FFFFFF
}
a:active {
text-decoration: none;
color:#99CC00
}
</STYLE>
Et sa entre les balise <body>
<script language="javascript" type="text/javascript">
function bouton(e) {
if (navigator.appName == 'Microsoft Internet Explorer'){
if (event.button==1){getelementbyid("style1");}
else if (event.button==2){getelementbyid("style2");}
}
if (navigator.appName == 'Netscape'){
if (e.which==1){getelementbyid("style1");}
else if (e.which==3){getelementbyid("style2");}
}
}
window.onmousedown=bouton;
document.onmousedown=bouton;
document.captureEvents(Event.MOUSEDOWN);
</script>
<a href=http://www.tonsite.com onmousedown()='bouton'>hello</a>
comme sait fait mais si tu copie et colle directement tous ton code dans ton site il risque di avoir des problème ^^
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
Donne plus d'information ( si c'est un site codé a la main ou un site du genre e-monsite.com ) s'il te plais
non mais c'est jute ça regarde se que je veux faire
https://forums.commentcamarche.net/forum/affich-13517914-curseur-rouge-bleue-lors-d-un-clique
C'est mon poste t'aura plus d'information
https://forums.commentcamarche.net/forum/affich-13517914-curseur-rouge-bleue-lors-d-un-clique
C'est mon poste t'aura plus d'information
Je ne comprend rien -_-' a vrai dire l'informatique et moi sa fait 2 -_-'
ajoute msn pour qu'on parle ça te dérange pas ?
Mon msn : arsenic_du_59@hotmail.fr
merci de consacré du temps for me ;)
++
ajoute msn pour qu'on parle ça te dérange pas ?
Mon msn : arsenic_du_59@hotmail.fr
merci de consacré du temps for me ;)
++
Nan c'est un curseur que je veux mettre sur windows regarde la vidéo.
Quand il clique sa fait 1 rond rouge quand il clique gauche et quand il clique droit sa fait un rond bleue regarde
https://www.octeam.fr/images/stories/video/Part1_SkyBox_Divx/avi <<< Fait le copier/coller car il prend pas le .avi
Quand il clique sa fait 1 rond rouge quand il clique gauche et quand il clique droit sa fait un rond bleue regarde
https://www.octeam.fr/images/stories/video/Part1_SkyBox_Divx/avi <<< Fait le copier/coller car il prend pas le .avi