Doc JavaScript - For Your Site | WebReference

Doc JavaScript - For Your Site

For Your Site


docjs.com

If you enjoy our content, we would appreciate a link to our site. This page presents several unique linking methods:

JavaScript Random Tip of the Day

Doc JavaScript now provides randomly selected JavaScript tips from our Tip Archive for your own site. Keep reading to find out how you can display our daily random selection.

Put the following HTML tag in the HEAD portion of your document:

<SCRIPT SRC="https://www.webreference.com/js/tip.js">
</SCRIPT>

This script doesn't actually affect your page. It only defines three JavaScript variables that you can use anywhere on your page:

  • docFile - the name of the current tip's file
  • docTitle - the title of the current tip
  • docDescription - the description of the current tip
Now you can take advantage of these variables in your scripts. For example, the following script generates a link to today's tip:

<SCRIPT LANGUAGE="JavaScript">
<!--
document.write('<A HREF="' + docFile +
'">' + docTitle + '</A>');
// -->
</SCRIPT>

JavaScript Tip Categories

Doc JavaScript's daily tips are organized in a bunch of categories. You can add our drop-down category list to your site by copying the following code:


[
select ]
Here's the result of the above HTML code:

Note that the style of the menu (font, color, etc.) can be changed via the attached style sheet.

JavaScript Tip Channels

If you've got full access to your server, you're ready to go one step further by adding our RSS channels to your site.

A Simple Link

If you like this site, please link to it. The following HTML code creates a link to our site:

<A HREF="https://www.docjs.com/">Doc JavaScript</A>

Description: Biweekly JavaScript columns and a new JavaScript tip every day of the week, including weekends. Also features various tools and other JavaScript resources.

Produced by Yehuda Shiran and Tomer Shiran.