I'm doing a problem for one of my homework assignments. We are supposed to change the background color and text, the user can select what color and whether to change the font from Serif or Sans-Serif. I feel like this is an easy script and i 'feel' like my logic is there but when I click on one of the colors or the fonts it does not change anything.
<!DOCTYPE html>
<html>
<head>
<title>12.6</title>
<script type="text/javascript">
function changeBGC(color)
{
document.bigColor = color;
}
function changeFontFamily(fontFam)
{
document.getElementById("para").style.fontFamily = fontFam;
}
</script>
</head>
<body>
<a href="#" onClick="changeBGC('blue')">Blue Color</a>
<a href="#" onClick="javascript:changeBGC('yellow')">Yellow Color</a>
<a href="#" onClick="javascript:changeBGC('green')">Green Color</a>
<br>
<a href="#" onClick="javascript:changeFontFamily('Arial, sans-serif')">SansSerif font!</a>
<a href="#" onClick="javascript:changeFontFamily(serif')">Serif font!</a>
<p id='para'> Text</p>
</body>
</html>