Asked by duncanb7
at 2024-06-04 07:33:26
Point:125 Replies:2 POST_ID:828309USER_ID:11059
Topic:
Web Servers;;Web Browsers
Since I am new to Web language, I would like to understand the concept about everything,
I have my domain name, and i put the following Example-1 code into mypublic_htmlindex.html on my server.
I've some misunderstanding about server and client's job during browering. Please help to answer
the question kindly
Question-1 my domain system is acting as a server ?
Question-2 When I browser www.mydomain.co.cc my IE will download the index.html from my server and run the html with javascript code in IE windows since IE is able to read HTML and Javascript syntax, Right ?
Question-3- THe server with domain name doesn't do anything or excution besides having index.html on its disk because the index.html is for client-side program, Right ?
Question-4 The javescript/HMTL is only client-side language, Right ? nothing relate to the Linux server
Question5- I put the example-2 code into server at public_html test.php. WHen I borrows it in my IE,
the html code in test.php is excuted by IE , how about the php code, whose responsiblity to excute the code
my server or my IE. When veiw the code in IE from tool bar , the php code is not existed except html code only.
Why ? People always said PHP is server-side lauguage.
Example-1
I have my domain name, and i put the following Example-1 code into mypublic_htmlindex.html on my server.
I've some misunderstanding about server and client's job during browering. Please help to answer
the question kindly
Question-1 my domain system is acting as a server ?
Question-2 When I browser www.mydomain.co.cc my IE will download the index.html from my server and run the html with javascript code in IE windows since IE is able to read HTML and Javascript syntax, Right ?
Question-3- THe server with domain name doesn't do anything or excution besides having index.html on its disk because the index.html is for client-side program, Right ?
Question-4 The javescript/HMTL is only client-side language, Right ? nothing relate to the Linux server
Question5- I put the example-2 code into server at public_html test.php. WHen I borrows it in my IE,
the html code in test.php is excuted by IE , how about the php code, whose responsiblity to excute the code
my server or my IE. When veiw the code in IE from tool bar , the php code is not existed except html code only.
Why ? People always said PHP is server-side lauguage.
Example-1
<html>
<head>
<script type="text/javascript">
function mouseOver()
{
document.getElementById("b1").src ="http://www.mydomaim.co.cc/images/gif/b_blue.gif";
}
function mouseOut()
{
document.getElementById("b1").src ="http://www.mydomain.co.cc/images/gif/b_pink.gif";
}
</script>
</head>
<body>
<a href="http://www.w3schools.com" target="_blank">
<img border="0" alt="Visit W3Schools!" src="http://www.hf-trade.co.cc/images/gif/b_blue.gif" id="b1" width="26" height="26" onmouseover="mouseOver()" onmouseout="mouseOut()" /></a>
</body>
</html>
<p>An absolute URL: <a href="http://www.w3schools.com" target="_blank" >W3Schools</a></p>
<p>A relative URL: <a href="tag_a.asp">The a tag</a></p>
</body>
</html>
Example-2
<html>
<body>
<a href="index.php">Home </a>
<a href="page2.php">Page 2</a>
<a href="page3.php">Page 3</a>
<a href="page4.php">Page 4</a>
<?php
echo "Hello World";
$file=fopen("index.html","r");
echo " File may already exists";
?>
</body>
</html>