answersLogoWhite

0


Best Answer

The Blur event will be fired when an element such as a window' frame' or form elements lose the Focus.

OnChange is when something within a field changes eg, you write something in a text input.

OnBlur When you mouse click or tab away from whatever item (window, textbox, etc...) you are using the OnBlur with. The action assigned to this activity is triggered only when you mouse-click or tab away

OnChange When you make ANY changes within a field, whether you type, delete, paste text.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is difference between onblur and onchange function in php?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Basic Math
Related questions

What type of action causes the following events to be triggered onAbout OnBlur onChange and onSelect?

onAbout - the user aborted the loading of a Web page.onBlur - the user deactivated an object (the object lost focus).onChange - the user changed an object in some way.onSelect - the user selected (highlighted) the contents of an object.


How do you add multiple onblur or onclick actions to a form?

You have to use JavaScript. It is built into the DOM, but it requires that to read and manipulate the Document Object Model.


Using anonymous JS methods create an input field that always converts the user typed value into uppercase when the focus is taken away?

<input type="text" name="name" onblur="this.value = this.value.toUpperCase();">


How do you develop a personal web page?

<html> <head> <script type ="text/javascript"> function find() { alert( "price of the selected book is Rs.100" } function loadbooks() { if ( document.test.subject.value "s2") { document.test.bo <html> <head> <script type ="text/javascript"> function find() { alert( "price of the selected book is Rs.100" } function loadbooks() { if ( document.test.subject.value "s2") { document.test.books.options[0] = new option (" organizational behave", 0) document.test.books.options[1] = new option ("reasearch", 1) document.test.books.options[2] = new option ("admin", 2) } } </script> </head> <body> <br/> <form name = "test"> <table border = 01 width = 100%> <tr><th align = center colspan = 2> Online Books price detail by : mc08202880</th></tr> <tr><td>selected category</td> <td><select name = "subject" onblur = loadBooks()> <option value = "s1">computerscience</option> <option value = "s2">mathematics</option> <option value = "s3">management sciences</option> </select></td></tr> <tr><td>select Book<td> <select name = "books"> <option>Please select one of the options above first</option> </select></tr></td> <tr align = center><th colspan =2> <input type = "button" value = "price of book" onMouseOver= if value find()></th></tr> </table> </form> </body> </html> <html> <head> <script type ="text/javascript"> function find() { alert( "price of the selected book is Rs.100" } function loadbooks() { if ( document.test.subject.value "s2") { document.test.books.options[0] = new option (" organizational behave", 0) document.test.books.options[1] = new option ("reasearch", 1) document.test.books.options[2] = new option ("admin", 2) } } </script> </head> <body> <br/> <form name = "test"> <table border = 01 width = 100%> <tr><th align = center colspan = 2> Online Books price detail by : mc08202880</th></tr> <tr><td>selected category</td> <td><select name = "subject" onblur = loadBooks()> <option value = "s1">computerscience</option> <option value = "s2">mathematics</option> <option value = "s3">management sciences</option> </select></td></tr> <tr><td>select Book<td> <select name = "books"> <option>Please select one of the options above first</option> </select></tr></td> <tr align = center><th colspan =2> <input type = "button" value = "price of book" onMouseOver= if value find()></th></tr> </table> </form> </body> </html>


What is event handling in java script?

Event handling is when an action from the user triggers a JavaScript function. An event handler is defined as the following:Click me!This will open an alert box with the message You clicked me! displayed in it when the user clicks the div element.There are many event handlers in JavaScript. Some common ones include:onclick (triggered when user clicks the element)onload (triggered when page, image, etc. loads)onfocus (triggered when element gains focus (becomes active))onblur (triggered when element loses focus)onmouseover (triggered when user's mouse pointer enters the element)onmouseout (triggered when user's mouse pointer leaves the element)onmousemove (triggered when user's mouse pointer is moved while it is on top of the element)onkeydown (triggered when user presses a key on the keyboard)onkeyup (triggered when user releases a key on the keyboard)onkeypress (triggered when user presses, then releases a key on the keyboard)I would recommend you look some of these up and find out more.Event handlers can be applied as HTML attributes as shown above, or they can be applied during JavaScript execution, as shown below.In Netscape-based browsers (Firefox, Google Chrome, etc.):var myHTMLElement=document.getElementById("myElement");myHTMLElement.onclick="You clicked me!"Or:var myHTMLElement=document.getElementById("myElement");myHTMLElement.addEventListener("click",function (){alert("You clicked me!");});Note that when using addEventListener, remove the "on" from the event name to get the first parameter. For example, "onload" becomes "load". Also, you can remove this event handler with removeEventListener using the same parameters as addEventListener.In Internet Explorer (prior to version 9):var myHTMLElement=document.getElementById("myElement");myHTMLElement.attachEvent("onclick",function (){alert("You clicked me!");});In Internet Explorer 9, you can use the method you used for Netscape-based browsers. Also, you can remove this event handler with detachEvent using the same parameters as attachEvent.I would encourage you to find out more about event handlers by searching Google.