<html> <body> <script language="JavaScript"> function function1() { document.all.myP.normalize(); alert("normalized"); } </script> <p id="myP">Text</p> <input id="myB" type="button" value="Normalize paragraph" onclick="function1();"> </body> </html>