carList = cars.innerHTML; alert(carList); carList = carList.replace(\"\",\"\").replace(\"\",\"\").replace(\"\",\"\").replace(\"
You can use a regular expression to match all of these at the same time:
carList = carList.replace(/<\/?(b|center)>/g,"");
The g flag at the end of the match string tells Javascript to replace all occurrences, not just the first one.
g