|
Why some java script run under tag only just lick following code
<body>
<form id="form1" runat="server">
<p id ="Demo0">
A pragraph
</p>
<div id="Demo1">
B Pragraph
</div>
<p id="demo">A Paragraph.</p>
<div id="myDIV">A DIV.</div>
</form>
<script type ="text/javascript">
document.getElementById("Demo0").innerHTML = "My Javascript Page0";
document.getElementById("Demo1").innerHTML = "My Javascript Page1"
</body>
|
|
|
|
|
And what's the question?
ProgramFOX
|
|
|
|
|
Please be more clear. I cannot understand what you are asking.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
sir i am just asking to you following java script run under body tag why he cant run out side body tag
<body>
<form id="form1" runat="server">
<p id ="Demo0">
A pragraph
</p>
<div id="Demo1">
B Pragraph
</div>
<p id="demo">A Paragraph.</p>
<div id="myDIV">A DIV.</div>
</form>
<script type ="text/javascript">
document.getElementById("Demo0").innerHTML = "My Javascript Page0";
document.getElementById("Demo1").innerHTML = "My Javascript Page1"
</script>
</body>
|
|
|
|
|
Actually, you should put the script tag in the head tag.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
You will need to change the contents of the divs AFTER the page loads.
vbmike
|
|
|
|