Re: Mettere tempo all'onclick
Inviato: 09/10/2015, 7:54
Rileggi il post di Sir con più attenzione
Inviato dal mio MotoE2(4G-LTE) utilizzando Tapatalk
Inviato dal mio MotoE2(4G-LTE) utilizzando Tapatalk
Sito di supporto italiano per phpBB
https://www.phpbbitalia.net/forum/
https://www.phpbbitalia.net/forum/viewtopic.php?f=119&t=12759
Codice: Seleziona tutto
<span style="color:#ff0000; margin-left:10px;"><span id="restorePerm">Stai provando i permessi di un utente</span></span><span id="restorePermX"> /</span><a id="restorePermXX" style="margin-left:-15px;" href="{U_RESTORE_PERMISSIONS}" onclick="document.getElementById('restorePerm').style.visibility='hidden',getElementById('restorePermX').style.visibility='hidden',miaFunzione().style.textDecoration='none';">{L_RESTORE_PERMISSIONS}</a>
Codice: Seleziona tutto
<script>
var target;
target = document.getElementById('restorePermXX').onclick = miaFunzione;
function miaFunzione() {
var obiettivo = getElementById('restorePermXX');
var obiettivo.style.visibility = "hidden";
var obiettivo.style.textDecoration='none';
setTimeout(function() {
document.getElementById('restorePermXX').style.visibility = "visible";
}, 9000);
}
</script>
<!-- IF U_RESTORE_PERMISSIONS -->
<a href="{U_RESTORE_PERMISSIONS}" id="restorePermXX">{L_RESTORE_PERMISSIONS}</a>
<!-- ENDIF -->
Codice: Seleziona tutto
<!-- IF U_RESTORE_PERMISSIONS -->
<a href="{U_RESTORE_PERMISSIONS}" id="restorePermXX">{L_RESTORE_PERMISSIONS}</a>
<!-- ENDIF -->
<script>
var target;
target = document.getElementById('restorePermXX').onclick = miaFunzione;
function miaFunzione() {
var obiettivo = getElementById('restorePermXX');
var obiettivo.style.visibility = "hidden";
var obiettivo.style.textDecoration='none';
setTimeout(function() {
document.getElementById('restorePermXX').style.visibility = "visible";
}, 9000);
}
</script>
Codice: Seleziona tutto
'use strict'
/* definizione varibili */
var elementoCheScompare;
elementoCheScompare = document.getElementById('restorePermXX').onclick = miaFunzione;
Codice: Seleziona tutto
/**
* function miaFunzione
*/
function miaFunzione() {
var elem;
elem = document.getElementById('restorePermXX');
// togli visibilità
elem.style.visibility = "hidden";
// dopo tot dai visibilità
setTimeout(function() {
elem.style.visibility = "visible";
}, 3000);
}
Codice: Seleziona tutto
<script>
'use strict'
var obiettivo = getElementById('restorePermXX');
var obiettivo.style.visibility = "hidden";
var obiettivo.style.textDecoration='none';
var elementoCheScompare;
elementoCheScompare = document.getElementById('restorePermXX').onclick = miaFunzione;
function miaFunzione() {
var elem;
elem = document.getElementById('restorePermXX');
elem.style.visibility = "hidden";
setTimeout(function() {
elem.style.visibility = "visible";
}, 3000);
}
</script>