<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"https://www.w3.org/TR/html4/strict.dtd">
<title>style changer button</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link id="mystyle" rel="stylesheet" type="text/css" href="style1.css">
<script type="text/javascript">
window.onload=function() {
obj0=document.getElementById('mybutton');
obj1=document.getElementById('mystyle');
obj0.onclick=function() {
if(obj0.value=='font-size:10px') {
obj0.value='font-size:36px';
obj0.value='font-size:10px';
plusMonth=exp.getTime()+(31*24*60*60*1000);
document.cookie='style='+styleid+';expires='+exp.toGMTString();
which=document.cookie.split('style=')[1];
obj0.value='font-size:36px';
obj0.value='font-size:10px';
<div><input id="mybutton" type="button" value="font-size:10px"></div>
<li><a href="anotherPage.html">another page</a></li>
<h1 id="test">this is a font size test</h1>