Se agradece cualquier ayuda, gracias de antemano y un saludo a todos.
Cita:
var myStyle = document.getElementById("css1");
var valorDeHref = myStyle.getAttribute("href"); //this returns the value of href
myStyle.setAttribute("href", "csss/one3.css"); // this sets href attribute to css/two.css
var boton1 = document.getElementById("foto1");
var boton2 = document.getElementById("foto2");
var boton3 = document.getElementById("foto3");
var boton4 = document.getElementById("foto4");
var click=1;
var variable_aux=" ";
var variable_aux2=" ";
function f1(){
if(click==1){
click=2;
variable_aux = myStyle.getAttribute("id");
}else{
variable_aux2 = myStyle.getAttribute("id");
variable_aux.id(variable_aux2);
variable_aux2.id(variable_aux);
click=1;
}
}function f2(){
if(click==1){
click=2;
variable_aux = myStyle.getAttribute("id");
}else{
variable_aux2 = myStyle.getAttribute("id");
variable_aux.id(variable_aux2);
variable_aux2.id(variable_aux);
click=1;
}
}function f3(){
if(click==1){
click=2;
variable_aux = myStyle.getAttribute("id");
}else{
variable_aux2 = myStyle.getAttribute("id");
variable_aux.id(variable_aux2);
variable_aux2.id(variable_aux);
click=1;
}
}function f4(){
if(click==1){
click=2;
variable_aux = myStyle.getAttribute("id");
}else{
variable_aux2 = myStyle.getAttribute("id");
variable_aux.id(variable_aux2);
variable_aux2.id(variable_aux);
click=1;
}
}
boton1.onclick = function () { // add an onclick event to the boton element
f1(); //this function is called when the boton element is clicked
};boton2.onclick = function () { // add an onclick event to the boton element
f2(); //this function is called when the boton element is clicked
};boton3.onclick = function () { // add an onclick event to the boton element
f3(); //this function is called when the boton element is clicked
};boton4.onclick = function () { // add an onclick event to the boton element
f4(); //this function is called when the boton element is clicked
};
var valorDeHref = myStyle.getAttribute("href"); //this returns the value of href
myStyle.setAttribute("href", "csss/one3.css"); // this sets href attribute to css/two.css
var boton1 = document.getElementById("foto1");
var boton2 = document.getElementById("foto2");
var boton3 = document.getElementById("foto3");
var boton4 = document.getElementById("foto4");
var click=1;
var variable_aux=" ";
var variable_aux2=" ";
function f1(){
if(click==1){
click=2;
variable_aux = myStyle.getAttribute("id");
}else{
variable_aux2 = myStyle.getAttribute("id");
variable_aux.id(variable_aux2);
variable_aux2.id(variable_aux);
click=1;
}
}function f2(){
if(click==1){
click=2;
variable_aux = myStyle.getAttribute("id");
}else{
variable_aux2 = myStyle.getAttribute("id");
variable_aux.id(variable_aux2);
variable_aux2.id(variable_aux);
click=1;
}
}function f3(){
if(click==1){
click=2;
variable_aux = myStyle.getAttribute("id");
}else{
variable_aux2 = myStyle.getAttribute("id");
variable_aux.id(variable_aux2);
variable_aux2.id(variable_aux);
click=1;
}
}function f4(){
if(click==1){
click=2;
variable_aux = myStyle.getAttribute("id");
}else{
variable_aux2 = myStyle.getAttribute("id");
variable_aux.id(variable_aux2);
variable_aux2.id(variable_aux);
click=1;
}
}
boton1.onclick = function () { // add an onclick event to the boton element
f1(); //this function is called when the boton element is clicked
};boton2.onclick = function () { // add an onclick event to the boton element
f2(); //this function is called when the boton element is clicked
};boton3.onclick = function () { // add an onclick event to the boton element
f3(); //this function is called when the boton element is clicked
};boton4.onclick = function () { // add an onclick event to the boton element
f4(); //this function is called when the boton element is clicked
};