Hello
I want do appear text in div with class name “example”…i try two methods but… with this method don’t work i don’t know why, but with the method below works. (I’m going get the file .js correctly.)
Anyone knows the problem?
<html>
<head>
<script type="text/javascript" src="/js/phases.js"></script>
</head>
<body>
<div class="example"><script>document.write(mensage[rand]);</script></div>
</body>
</html>
<html>
<head>
<script type="text/javascript">
var mensage = new Array(
'example',
'example2',
var rand = Math.floor(Math.random() * 2);
</script>
</head>
<body>
<div class="example"><script>document.write(mensage[rand]);</script></div>
</body>
</html>
Thanks!