H
Henry
Hi
I have a problem, pls see below:
<html>
:
<script type="text/javascript">
<!--
function addCode () {
document.getElementById('emptySpace').innerHTML+=
"<b>This is a test part </b><script
language='javascript'>window.alert('Hi');</script>";
}
// -->
</script>
:
<center id="emptySpace"></center>
<a href="javascript:addCode()">Add Code</a>
:
</html>
The problem is when I clicked on the link, only the text "This is a
test part" was displayed. The alert box was not appear.
Please help me, thanks.
I have a problem, pls see below:
<html>
:
<script type="text/javascript">
<!--
function addCode () {
document.getElementById('emptySpace').innerHTML+=
"<b>This is a test part </b><script
language='javascript'>window.alert('Hi');</script>";
}
// -->
</script>
:
<center id="emptySpace"></center>
<a href="javascript:addCode()">Add Code</a>
:
</html>
The problem is when I clicked on the link, only the text "This is a
test part" was displayed. The alert box was not appear.
Please help me, thanks.