<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Untitled</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<style type="text/css">
html,body{height:100&#37;}
</style>
<script type="text/javascript">
function strRep(){
var text="class II*Class V | Class II*Class V|5";
alert(text);
var text=text.replace("*",";");
alert(text);

}
</script>
</head>
<body onclick="strRep();">

</body>
</html>
i am trying to replace all occurance of * from string but above code is replacing only 1st occurance of * , can any one help me why