Javascript examples for DOM:Event
The view event property returns the Window object where the event occured.
A String, representing the type of the event
The following code shows how to get the event view:
<!DOCTYPE html> <html> <body> <p>Click the button to get the event view.</p> <button onclick="myFunction(event)">Test</button> <p id="demo"></p> <script> function myFunction(event) {/* ww w. j av a 2 s . co m*/ var x = event.view; document.getElementById("demo").innerHTML = x; } </script> </body> </html>