truenerins
http://imapo.ru/css/apolink1.css
Кажется вот так: var theme = document.getElementById('apolink');
window.onload = function() {
if(!localStorage.getItem('apolink')) {
theme.setAttribute('href', 'css/apolink1.css');
} else {
theme.setAttribute('href', 'css/apolink' + localStorage.getItem('apolink') + '.css');
}
};
function apochangeme(a) {
if(a == 1) {
theme.setAttribute('href', 'css/apolink1.css');
localStorage.removeItem('apolink');
} else {
theme.setAttribute('href', 'css/apolink' + a + '.css');
localStorage.setItem('apolink', a);
};
};