var browser=navigator.appName; var b_version=navigator.appVersion; <a href=”http://www.justetc.net” target=”_blank”> <img border=”0″ alt=”hello” src=”b_pink.gif” id=”b1″ width=”26″ height=”26″ onmouseover=”mouseOver()” onmouseout=”mouseOut()” /> Place the following code under script tag/in a javascript file function mouseOver() { document.getElementById(“b1″).src =”b_blue.gif”; } function mouseOut() { document.getElementById(“b1″).src =”b_pink.gif”; } <map name=”planetmap”> <area shape =”rect” coords =”0,0,82,126″ onMouseOver=”writeText(‘You are over the target …
Tag: জাভারস্ক্রিপ্ট
Aug 29
JavaScript Form Validation: Validate a Form Collecting Credit Card Information
function validateCollectPaymentInformationForm() { var method, name, number, expiry, errMsg errMsg = “”; method = document.getElementById(‘paymentMethod’); name = document.getElementById(‘txtCCName’); number = document.getElementById(‘txtCCNumber’); if (method.value == “” || method.value == “0” || method.value == null){ …
Aug 29
GetElementsByName an example: Checkbox
<html> <head> <script type=”text/javascript”> function getElements() { var x=document.getElementsByName(“myInput[]”); alert(x.length); alert(x[0].value); alert(x[1].value); alert(x[2].value); } </script> </head> <body> <input …
Aug 29
Driver template to create and start a Thread object.
** Taken from Core Web Programming from * Prentice Hall and Sun Microsystems Press, * © 2001 Marty Hall and Larry Brown; * may be freely used or adapted. */ public class DriverClass extends SomeClass { … public void startAThread() { // Create a Thread object. ThreadClass thread = new …