A lot of the things people like about the Web are to do with JavaScript and client-side activities. You can arrange for many interesting things to happen for your web clients without changing pages all that often, which used to be all the rage in the early days of the web. It is when getting form information off the person browsing that you really need to transfer to a new page, but there are so many things Javascript can do using the DOM (document object model).
The Document Object Model (DOM) is a cross-platform and language-independent convention for representing and interacting with objects in HTML, XHTML and XML documents.[1] Objects in the DOM tree may be addressed and manipulated by using methods on the objects. The public interface of a DOM is specified in its application programming interface (API). The history of the Document Object Model is intertwined with the history of the “browser wars” of the late 1990s between Netscape Navigator and Microsoft Internet Explorer, as well as with that of JavaScript and JScript, the first scripting languages to be widely implemented in the layout engines of web browsers.
Click on picture above to go to Javascript page for a Slide Show of Playing Cards.
Link to Document Object Model information … … via Wikipedia, from where quote above is derived.
Download programming source code and rename to PackOfCards.html … and check out the code for what images you need to create in an “images” subdirectory.
See the ideas here further developed in the tutorial HTML Table of Iframe PHP Slide Shows Tutorial.
Did you know …
JavaScript makes a great easy-access Calculator?
Try typing the lines below into the address bar of your favourite browser:
Javascript: eval(512 / 380);
Javascript: eval(512 * 380);
Javascript: eval(512 – 380);
Javascript: eval(512 + 380);
Javascript: eval(512 % 380);
These days we spend so much time on the Internet it is a much quicker way to get to a calculator!
If this was interesting you may be interested in this too.



Revisiting your Worldwide Country Quiz so that the Geo Chart still draws a map even for a small country such as Andorra, and adding Wikipedia images after an answer, keeps the focus on a working world-country quiz rather than only on the surrounding code. I work on World Geography; our world map quiz is a free, untimed browser option for adults and does not need an account. It is another practice link, not a programming tutorial and not a replacement for the Worldwide Country Quiz you are building here.