WebRef.eu  - Internet Marketing and Online Business Resources  

Home / Site Map | TwitterTwitter | Contact

Google
 

Javascript Notes

Notes on how to code with Javascript.

How to Add A Javascript Script to Your Page

Javascript is put into script tags, and can be put in the head section of your html page. Below is a simple example that will display an alert when the page is loaded. Note we have not used a function, so it does not need to be called and will run by default when the page is loaded.

Here's the full web page code:

<!doctype html>
<html>

<head>
<meta charset="utf-8">
<title>Javascript Simple Alert Example</title>
<script language="javascript">
alert("Hi there, welcome to this page.")
</script>
</head>

<body>

<p>Javascript simple alert example page.</p>

</body>

</html>

See working example.

Javascript Back

<a href='javascript:history.go(-1)'>back</a>

Javascript Status Bar Masking

<a href="http://www.youraffiliate link" onMouseOver="window.status='your text here!'; return true" onMouseOut="window.status=''; return true">Click here</a>

Bookmark This Page Script

I found this example script at:

https://www.thewebflash.com/how-to-add-a-cross-browser-add-to-favorites-bookmark-button-to-your-website/

However, I found it to only provide an Add to Bookmarks pop-up in Firefox, so it does not add that much value to the user. Here's the working example.

 

 

 





 




Low Prices UK Shopping

Compare Prices
at LowPrices.co.uk


Home / Site Map | TwitterTwitter | Contact

All Content ©2016 WebRef.eu