Thursday, August 30, 2007

Mi Colección de Funciones en Java Script

function showloading(div){
var div=document.getElementById(div);
div.innerHTML="loading...";
}
function printindiv(div,msg){
var div=document.getElementById(div);
div.innerHTML=msg;
}
function hiddediv(div){
document.getElementById(div).style.display="none";
}
function showdiv(div){
document.getElementById(div).style.display="block";
}
function focusinelement(div){
document.getElementById(div).focus();
}
function cleardiv(div){
var div=document.getElementById(div);
div.innerHTML="";
}
function copyhtmltovalue(div,field){
document.getElementById(field).value = document.getElementById(div).innerHTML;
}
function copyvaluetohtml(filed,div){
document.getElementById(div).innerHTML = document.getElementById(field).value;
}
function copyhtmltohtml(divA,divB){
document.getElementById(divB).innerHTML = document.getElementById(divA).innerHTML;
}
function copyvaluetovalue(fieldA,fieldB){
document.getElementById(fieldB).value = document.getElementById(filedA).value;
}
function changecolortr(id,color){
var div = document.getElementById(id);
div.className = color;
}

0 Comments:

Post a Comment

<< Home