This is a discussion on java within the Java Programming forums, part of the Software Development category; How to convert numbers to strings using JavaScript? You can prepend the number with an empty string var mystring = "&...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| How to convert numbers to strings using JavaScript? You can prepend the number with an empty string var mystring = ""+myinteger; or var mystring = myinteger.toString(); You can specify a base for the conversion, var myinteger = 14; var mystring = myinteger.toString(16); mystring will be "e". |
| Sponsored Links |
| |||
| How to change style on an element? Between CSS and javascript is a weird symmetry. CSS style rules are layed on top of the DOM. The CSS property names like "font-weight" are transliterated into "myElement.style.fontWeight". The class of an element can be swapped out. For example: document.getElementById("myText").style.color = "green"; document.getElementById("myText").style.fontSize = "20"; -or- document.getElementById("myText").className = "regular"; |
| |||
| How to have the status line update when the mouse goes over a link (The support of the status line is sporadic)? <a href="javascript.shtml" onmouseover="window.status='Hi There!';return true" onmouseout="window.status='';return true">Look at the Status bar</a> Look at the Status bar as your cursor goes over the link. |
| |||
| How to write messages to the screen without using "document.write()" ? Changing the contents of an element is a much better solution. When the method showStatus is invoked it will change the content of the span. ... function showStatus(message) { var element = document.getElementById("mystatus"); element.textContent = message; //for Firefox element.innerHTML = message; //for IE (why can't we all just get along?) return true; } ... <span id="mystatus">Test. </span> |
| |||
| What is the difference between undefined value and null value? 1 Undefined value cannot be explicitly stated that is there is no keyword called undefined whereas null value has keyword called null 2 Typeof undefined variable or property returns undefined whereas typeof null value returns object |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| integerate Java Beans in java application | saravanan | Java Programming | 1 | 03-26-2008 01:22 AM |