I wanted to change the color of the label to Red on button click
However the code isn't working everything seems to be right
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
</title>
<script type="text/javascript">
function changeColor(id, newColor) {
var labelObject = document.getElementById(id);
$("#" + id).css("color", newColor);
}
</script>
</head><body>
<form id="frm2">
<label for="model">Male</label>
<input type="text" name="cars" id="model" />
<br />
<label for="female">Female</label>
<input type="text" name="cars" id="color" />
</form>
<input type="button" value="Change Label Color" onclick="return changeColor('label', 'red')" />
</body>
</html>
Please help