I'm having problems getting this button to work here is the HTML
<head>
<script type="text/javascript" src="Objects.js"></script>
<title></title>
</head>
<body>
<form>
<input type="button" value="Go Searching!" id="work_car" />
</form>
</body>
</html>
And here is the JavaScript:
function car(seats,engine,theradio) {
this.seats=seats;
this.engine=engine;
this.theradio=theradio;
}
var work_car=new car ("cloth","V8","Tape Deck");
b1.onclick=work_car(){
document.write=("I want a car with +work_car.seats+ yeah");
};
var b1 = document.getElementById("work_car");
I want the button to display sentence by getting the name +work_car.seats+ from the Object, and it's not working.