Created
May 18, 2014 16:58
-
-
Save A-gambit/878523569680701470ff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ДО | |
function prepear(){ | |
//перевірка на рівності фрагментів | |
if(b.innerText===a.innerText){ | |
b.style.color="green"; | |
a.style.color="green"; | |
} | |
else{ | |
b.style.color="red"; | |
a.style.color="blue"; | |
} | |
//маркування тегів фрагментів before | |
for(var i=0;i<bTag.length;i++){ | |
if(bTag[i].src!==undefined) | |
bTag[i].style.cssText="border: 4px solid red;"; | |
else | |
bTag[i].style.cssText="color: red;"; | |
} | |
//маркування тегів фрагментів after та підготовка масиву mark | |
for(var i=0;i<aTag.length;i++){ | |
if(aTag[i].src!==undefined) | |
aTag[i].style.cssText="border: 4px solid blue;"; | |
else | |
aTag[i].style.cssText="color: blue;"; | |
mark[i]=true; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Посли | |
//перевірка на рівності фрагментів | |
if(b.innerText===a.innerText) allRigth(); | |
else colored(); | |
function allRight(){ | |
b.style.color="green"; | |
a.style.color="green"; | |
} | |
function colored(){ | |
b.style.color="red"; | |
a.style.color="blue"; | |
} | |
//маркування тегів фрагментів before | |
for(var i=0;i<bTag.length;i++) | |
if(bTag[i].src!==undefined) | |
bTag[i].style.cssText="border: 4px solid red;"; | |
else | |
bTag[i].style.cssText="color: red;"; | |
//маркування тегів фрагментів after та підготовка масиву mark | |
for(var i=0;i<aTag.length;i++){ | |
if(aTag[i].src!==undefined) | |
aTag[i].style.cssText="border: 4px solid blue;"; | |
else | |
aTag[i].style.cssText="color: blue;"; | |
mark[i]=true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment