C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...







More practical Approach



This article explains practical approach that we have learned in previous chapter



Well, Let us write an example that shows an alert message from browser.

So, how to proceed it?

Yes. It’s quite simple. Just place the message that needs to be displayed in alert box in double quotes.

The same ' Welcome to Spider ' in an alert box




<html>

<body>

<script language=”text/javascript">

window.alert("Welcome to Dotnetspider Tutorails");

</script>

</body>

</html>



So the output in the browser would be an alert box with Welcome to dotnetspider tutorials

What will happen if you don't specify any arguments in the alert method? Does it give an Error?

Just check and see.

Well, it doesn't give any error but you will get an alert box but no message is shown since we didn't specify any message.

Note: Please don't forget to place the message in double quotes. Otherwise you will get an error as JavaScript is case sensitive. Another point here it’s our choice to use single quotes or double quotes in an alert box while quoting text.

The only part of an alert box you have control over is the text.



  • Next Chapter: Working with confirm and prompt

  • Previous Chapter: Javacript popup objects!

  • Tutorial Index



  • dotNet Slackers

    About Us    Contact Us    Privacy Policy    Terms Of Use