Posts

Showing posts with the label javascript

Interview questions and answers : JavaScript

What’s relationship between JavaScript and ECMAScript? - ECMAScript is yet another name for JavaScript (other names include LiveScript). The current JavaScript that you see supported in browsers is ECMAScript revision 3.  What are JavaScript types? - Number, String, Boolean, Function, Object, Null, Undefined.  How do you convert numbers between different bases in JavaScript? - Use the parseInt() function, that takes a string as the first parameter, and the base as a second parameter. So to convert hexadecimal 3F to decimal, use parseInt ("3F", 16);  What does isNaN function do? - Return true if the argument is not a number.  What is negative infinity? - It’s a number in JavaScript, derived by dividing negative number by zero.  What boolean operators does JavaScript support? - &&, || and !  What does "1"+2+4 evaluate to? - Since 1 is a string, everything is a string, so the result is 124.  How about 2+5+"8"? - Since 2 and 5 are in...

HTML table to Excel table using Javascript

Image
Convert HTML tabular date to Excel form using Javascript Let try to generate html data to xml data by using code below: < html > < head > < script type="text/javascript" > function CreateExcelSheet() { var x=myTable.rows var xls = new ActiveXObject("Excel.Application") xls.visible = true xls.Workbooks.Add for (i = 0; i <  x.length; i++) { var y = x[i].cells for (j = 0; j <  y.length; j++) { xls.Cells( i+1, j+1).Value = y[j].innerText } } } < /script > < /head > < body marginheight="0" marginwidth="0" > < form > < input type="button" onclick="CreateExcelSheet()" value="Create Excel Sheet" > < /form > < table id="myTable" border="1" > < tr > < b >< td >Name < /td > < td >Age< /td >< /b >< /tr > < tr > < td >Shivani < /td > <...

Smooth Javascript Image Zooming For Your Web Pages

Wow.. TOday i have found one new fancy Zoom in Effect for Thumbnail images. Its Plus point is it works in all most widly used browsers Firefox, safari and IE6-7 both. FancyZoom 1.1 http://www.cabel.name/2008/02/fancyzoom-10.html Javascript Image Magnification 2.5 http://www.c6software.com/Products/PopBox/Default.aspx