Let following text field. By following statement you can set its default value. Use focus() event to change value when…