It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Java Forum

make copy/paste and select all text area

make copy/paste and select all text area

Postby skyonline on Sat Dec 12, 2009 3:46 am

hai..anbody can help me how to put copy/paste and select all in textarea (result)

Code: Select all
<script type="text/javascript">
function translate(phrase) {
   phrase = document.getElementById('input').value;
   phrase = phrase.replace(/why/g, "y");
   phrase = phrase.replace(/are/g, "r");
   phrase = phrase.replace(/you/g, "u");
   phrase = phrase.replace(/for/g, "4");
   phrase = phrase.replace(/to/g, "2");
   document.getElementById('output').value = phrase;
}
</script>

<textarea id="input"></textarea><br />
<input type="button" value="translate" onClick="translate();" /><br />
<textarea id="output"></textarea>
skyonline
 
Posts: 16
Joined: Mon Jun 09, 2008 4:04 am

Who is online

Users browsing this forum: No registered users and 3 guests