Showing posts with label JAVA SCRIPT. Show all posts

Free ebook - Beginning JavaScript

Beginning JavaScript, 4th Edition

JavaScript is the definitive language for making the Web a dynamic, rich, interactive medium. This guide to JavaScript builds on the success of previous editions and introduces you to many new advances in JavaScript development. The reorganization of the chapters helps streamline your learning process while new examples provide you with updated JavaScript programming techniques.

You’ll get all-new coverage of Ajax for remote scripting, JavaScript frameworks, JavaScript and XML, and the latest features in modern Web browsers. Plus, all the featured code has been updated to ensure compliance with the most recent popular Web browsers.


Product Details

  • Paperback: 792 pages
  • Wrox Press (2009)
  • Language: English
  • ISBN-10: 0470525932

Free Download Links :

1. Hotfile Link
http://hotfile.com/.../Wrox.Beginning.JavaScript.4th.Edition.Oct.2009.rar.html

2. Depositfiles Link
http://depositfiles.com/.../5kbtzupkp


If you like this post, please add your comments and 'A thanks' would be nice.

Thanks : www.downarchive.com

Free ebook - Beginning JavaScript

Beginning JavaScript, 4th Edition

JavaScript is the definitive language for making the Web a dynamic, rich, interactive medium. This guide to JavaScript builds on the success of previous editions and introduces you to many new advances in JavaScript development. The reorganization of the chapters helps streamline your learning process while new examples provide you with updated JavaScript programming techniques.

You’ll get all-new coverage of Ajax for remote scripting, JavaScript frameworks, JavaScript and XML, and the latest features in modern Web browsers. Plus, all the featured code has been updated to ensure compliance with the most recent popular Web browsers.


Product Details

  • Paperback: 792 pages
  • Wrox Press (2009)
  • Language: English
  • ISBN-10: 0470525932

Free Download Links :

1. Hotfile Link
http://hotfile.com/.../Wrox.Beginning.JavaScript.4th.Edition.Oct.2009.rar.html

2. Depositfiles Link
http://depositfiles.com/.../5kbtzupkp


If you like this post, please add your comments and 'A thanks' would be nice.

Thanks : www.downarchive.com

How to catch TAB key press with JavaScript?

The example code is tested in IE, Firefox and Opare. Probably also works in Netscape as well as others like Safari.

<html>
<head>
<script type="text/javascript">
var obj;
var TAB = 9;
function catchTAB(evt,elem)
{
obj = elem;
var keyCode;
if ("which" in evt)
{// NN4 & FF &amp; Opera
keyCode=evt.which;
} else if ("keyCode" in evt)
{// Safari & IE4+
keyCode=evt.keyCode;
} else if ("keyCode" in window.event)
{// IE4+
keyCode=window.event.keyCode;
} else if ("which" in window.event)
{
keyCode=evt.which;
} else { alert("the browser don't support"); }

if (keyCode == TAB)
{
obj.value = obj.value + "\t";
alert("TAB was pressed");
setTimeout("obj.focus()",1);// the focus is set back to the text input
}
}
</script>
</head>
<body>
<input type="text" onkeydown="catchTAB(event,this);">
</body>
</html>

Hope this will help you. Happy coding!

How to catch TAB key press with JavaScript?

The example code is tested in IE, Firefox and Opare. Probably also works in Netscape as well as others like Safari.

<html>
<head>
<script type="text/javascript">
var obj;
var TAB = 9;
function catchTAB(evt,elem)
{
obj = elem;
var keyCode;
if ("which" in evt)
{// NN4 & FF &amp; Opera
keyCode=evt.which;
} else if ("keyCode" in evt)
{// Safari & IE4+
keyCode=evt.keyCode;
} else if ("keyCode" in window.event)
{// IE4+
keyCode=window.event.keyCode;
} else if ("which" in window.event)
{
keyCode=evt.which;
} else { alert("the browser don't support"); }

if (keyCode == TAB)
{
obj.value = obj.value + "\t";
alert("TAB was pressed");
setTimeout("obj.focus()",1);// the focus is set back to the text input
}
}
</script>
</head>
<body>
<input type="text" onkeydown="catchTAB(event,this);">
</body>
</html>

Hope this will help you. Happy coding!

How to catch TAB key press with JavaScript?

The example code is tested in IE, Firefox and Opare. Probably also works in Netscape as well as others like Safari.

<html>
<head>
<script type="text/javascript">
var obj;
var TAB = 9;
function catchTAB(evt,elem)
{
obj = elem;
var keyCode;
if ("which" in evt)
{// NN4 & FF &amp; Opera
keyCode=evt.which;
} else if ("keyCode" in evt)
{// Safari & IE4+
keyCode=evt.keyCode;
} else if ("keyCode" in window.event)
{// IE4+
keyCode=window.event.keyCode;
} else if ("which" in window.event)
{
keyCode=evt.which;
} else { alert("the browser don't support"); }

if (keyCode == TAB)
{
obj.value = obj.value + "\t";
alert("TAB was pressed");
setTimeout("obj.focus()",1);// the focus is set back to the text input
}
}
</script>
</head>
<body>
<input type="text" onkeydown="catchTAB(event,this);">
</body>
</html>

Hope this will help you. Happy coding!

Java Script : 'toFixed' Math function for number format

<div style="text-align: justify;">We can use 'toFixed()' function in math to format a number upto required decimal places. The value we get is after rounding the number upto the decimal place required. This function is frequently used in java script. </div>

Here is the syntax.
my_val.toFixed(4)

my_val is the variable which stores the number. Here we are formatting the number upto 4 decimal places.

Let us try with some examples with different number values.
var my_val=11.257;
document.write (my_val.toFixed(2)); // output 11.26

var my_val=11.25;
document.write (my_val.toFixed(1)); // output 11.3

var my_val=11.978;
document.write (my_val.toFixed(4)); // output 11.9780

Use the tips!

Java Script : 'toFixed' Math function for number format

<div style="text-align: justify;">We can use 'toFixed()' function in math to format a number upto required decimal places. The value we get is after rounding the number upto the decimal place required. This function is frequently used in java script. </div>

Here is the syntax.
my_val.toFixed(4)

my_val is the variable which stores the number. Here we are formatting the number upto 4 decimal places.

Let us try with some examples with different number values.
var my_val=11.257;
document.write (my_val.toFixed(2)); // output 11.26

var my_val=11.25;
document.write (my_val.toFixed(1)); // output 11.3

var my_val=11.978;
document.write (my_val.toFixed(4)); // output 11.9780

Use the tips!

Java Script : 'toFixed' Math function for number format

<div style="text-align: justify;">We can use 'toFixed()' function in math to format a number upto required decimal places. The value we get is after rounding the number upto the decimal place required. This function is frequently used in java script. </div>

Here is the syntax.
my_val.toFixed(4)

my_val is the variable which stores the number. Here we are formatting the number upto 4 decimal places.

Let us try with some examples with different number values.
var my_val=11.257;
document.write (my_val.toFixed(2)); // output 11.26

var my_val=11.25;
document.write (my_val.toFixed(1)); // output 11.3

var my_val=11.978;
document.write (my_val.toFixed(4)); // output 11.9780

Use the tips!