I want to to use Mystring as alert's parameter so when mouse on the link, it will alert Mystring?
<html>
<head>
<script>
window.onload = initAll;
function initAll() {
var Mystring = "Hello world";
var aTag = document.getElementsByTagName('a')[0];
aTag.onmouseover = runAlert;
}
function runAlert() {
alert(Mystring);
}
</script>
</head>
<body>
<a href="#">Over me</a>
</body>
</html>