Mostra un messaggio in Area di invio messaggio in Tag che viene cancellato al Click.

« Older   Newer »
  Share  
view post Posted on 6/1/2012, 19:05     +1   -1
Avatar

«Water is the best!»







Group:
Amministratore
Posts:
23,876
Reputation:
+90
Location:
...

Status:


ecco il codice
CODICE
<script type="text/javascript">
//By DarkStyle ©

var tagMessage = "Testo, esempio : non spammate in tag! Leggete il regolamento, ecc.";
var alertTagMessage = "Non puoi inviare il messaggio predefinito!";
var tagTextInput = document.tagboard ? document.tagboard.ffmsg : 0;
var tagInput = document.tagboard ? document.tagboard.elements : 0;

if(tagTextInput) {
function modifyvalue() {
if (tagTextInput.value == "") {
tagTextInput.style.fontStyle = "italic";
tagTextInput.value = tagMessage;
tagTextInput.style.color = "808080";
} }

function resetvalue() {
if (tagTextInput.value == tagMessage) {
tagTextInput.style.fontStyle = "normal";
tagTextInput.value = "";
tagTextInput.style.color = "";
} }

modifyvalue();
tagTextInput.onfocus = resetvalue;
tagTextInput.onblur = modifyvalue;
for(i = 0; i < tagInput.length; i++) {
var ind = new function() {this.i = i;};
if(tagInput[ind.i].className == 'codebuttons' && tagInput[ind.i].type != 'submit') {tagInput[ind.i].onfocus = resetvalue;} }
for(j = 0; j < tagInput.length; j++) {
var ind1 = new function() {this.j = j;};
if(tagInput[ind1.j].type == 'submit' && tagInput[ind1.j].value != 'Aggiorna') {tagInput[ind1.j].onclick = function() {if(tagTextInput.value == tagMessage) {alertTagMessage ? alert(alertTagMessage) : void(0); return false;} } } }
}
</script>




CODICE
<script type="text/javascript">
//By DarkStyle ©
var tagMessage = "Testo, esempio : non spammate in tag! Leggete il regolamento, ecc.";


Modificate Testo, esempio : non spammate in tag! Leggete il regolamento, ecc. con il messaggio che vorreste che appaia
 
Web Contatti  Top
0 replies since 6/1/2012, 19:05   14 views
  Share