Click here to Skip to main content
15,910,083 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<!DOCTYPE html>
<html>
<head>
<script>
function myFunction()
{
alert("I am an alert box!");
}
</script>
</head>
<body>

<input type="button" onclick="myFunction()" value="Show alert box">

</body>
</html>




When i write above script in textbox.i wan to handle alertbox
Posted
Comments
Sushil Mate 31-Oct-12 0:31am    
could you explain more? its not making any sense here?
shriti 3 31-Oct-12 0:37am    
im putting above script in textarea and after enter it shows alert box.

1 solution

Try like this..


onkeyup="myFunction()" onchange="myFunction()"
onclick="myFunction()">
 
Share this answer
 
Comments
shriti 3 31-Oct-12 1:24am    
ok i think this is not the correct solution which u provide.Anyways i resolved using htmlencode as output string .Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900