Getting the lostFocus event

I have added the following element.

	<input style="width: 98%; height: 30px; font-size: 16px;  type=" text"="" id="email">

I need to verify the email format on lostFocus using:

document.getElementById("email").addEventListener("focusout", myFunction);

function myFunction() {
  alert("Input field lost focus.");
 //verify email


Where do I place this code please.

scene/layoutload ... and do not forget to remove the scripttags :slight_smile: