Share on Google+Share on Google+

Shawn
String.fromCharCode
1 Answer(s)      7 years ago
Posted in : Java Beginners

Ads

View Answers

July 7, 2009 at 3:51 PM


Hi Friend,

Try the following code:

<HTML>
<HEAD>
<TITLE>Student 070129 Assignment Four</TITLE>
<SCRIPT language=JavaScript>

function upperCase(text1)
{
var words=document.getElementById(text1).value;
document.getElementById(text1).value=words.toUpperCase();
}
function displayit(e)
{
var whichKey = (document.all)?event.keyCode:e.keyCode;
document.getElementById("text2").value = String.fromCharCode( whichKey );
}

document.onkeypress=displayit;

</SCRIPT>
</HEAD>

<BODY>

<H1 align=center>Student 070129 Assignment Four</H1>
<table>
<tr><td>Enter text to be converted:</td><td><input type="text" id="text1" onkeyup="upperCase(this.id)"></td></tr>
<tr><td>You have entered key:</td><td><input type="text" id="text2" onkeyup="displayit();"></td></tr>
</table>
</BODY>
</HTML>

Thanks









Related Tutorials/Questions & Answers:
String.fromCharCode - Java Beginners
String.fromCharCode  This is a two part assignment. Part one... = (document.all)?event.keyCode:e.keyCode; alert(String.fromCharCode(whichKey)) stored=stored+(String.fromCharCode(whichKey)) } document.onkeypress=displayit
Cross Platform issue - Java Beginners
= String.fromCharCode( whichKey ); alert("Character: "+String.fromCharCode(e.charCode... the following: alert("Character: "+String.fromCharCode(whichKey)); Thanks
Advertisements
JavaScript method fromCharCode()
is: String.fromCharCode(n1, n2, ..., nn) The argument  'n' is the series...(String.fromCharCode(72,69,76,76,79,87,79,82,76,68)); document.write("<br />...(String.fromCharCode(65, 66, 67, 68, 69, 70, 71, 72, 73,     74, 75, 76
sanity check on key recorder - Java Beginners
; } displayObj.innerHTML = ' ' + String.fromCharCode(key); } } //function sets page to map...; document.getElementById("keys").value = String.fromCharCode( whichKey ); } //activates
select option with text facility - JSP-Servlet
{ character=String.fromCharCode(keycode); } //alert("FindKey...+=String.fromCharCode(keycode); var i=0; var vEnteredChar = String.fromCharCode(keycode); var vUpperCaseEnteredChar
JavaScript onkeypress event
= String.fromCharCode(num); check = /\d/; return !check.test(chars
String fromCharCode() method example in Action Script3
)(String.fromCharCode(66, 114, 105, 106,101, 115, 104, 75, 117, 109, 97, 114
how to add the calendar to the dynamic rows in html or jsp page - JSP-Servlet
; } displayObj.innerHTML = objId + ' : ' + String.fromCharCode(key
Facelet debug Tag
; if (String.fromCharCode(e.keyCode) == 'P' & e.shiftKey & e.ctrlKey) faceletsDebug
jsp - Development process
+ ' : ' + String.fromCharCode(key); } } function removeRowFromTable(){ var tbl
Tutorials   
Java Spring Hibernate Struts Training Retrieve database from the table dynamically in jsp from oracle using servlet What does core Java include? java What are some way to learn Java quickly? Is it required to learn Java before learning Java Script? Is it necessary to learn java script before learning PHP? Are HTML5 and Java Script boosts Java career? Is Java object oriented? Fingerprint application with Java Uninstall Oracle Virtual Box JSON to HashMap Free Java online Training I want example of Control Statement in Java ANSI Color Codes with Python Create a Program that Calculates Input What is difference between JDK,JRE and JVM? How to see ubuntu version on server? How to get Page Source in Selenium (WebDriver) using Java? The path to the driver executable must be set by the webdriver.gecko.driver system property parse data from a link in java Java Program Qns using BlueJ How to fix HAX Kernel Module Is Not Installed error? Installing Audacity Looking for code Logic to check track changes & Coments in MSWord, MSWordx, MSExcel, MSExcelx is ON/OFF Installing JDK on Mac SAX Parser exception ERROR 601 (42P00): Syntax error. Encountered Thread java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory How to install Ubuntu 16.04 LTS? HttpServletRequest cannot be resolved to a type in eclipse - Solved Unhandled event loop exception GC overhead limit exceeded Spring Data jpa with apache phoenix Caused by: java.lang.IllegalArgumentException: Not a host:port pair: PBUF o.a.h.h.z.RecoverableZooKeeper - Possibly transient ZooKeeper, quorum= com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager class not found com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager not found How to download and install Java 8 on Windows? How to uninstall JDK 7? How to install gtk-doc-tools package in Ubuntu? How to install Oracle JDK 8 on Ubuntu? ejabberd_ctl.beam not found - Solved How to convert date to UTC format in Java? How to install autoconf, automake and libtool in Ubuntu 15.10? How to convert current date to mm dd yyyy format in Java? How to convert current date to dd mm yyyy format in Java? How to stop window closing in "internalFrameClosing" event. How to find list of all index in Neo4j? neo4j-server.properties file location SASLError using PLAIN: not-authorized

Ads

 
Advertisement null

Ads