onclick="document.answer.Tim10.value = 'Having papers from the registering body that attest to their ancestry. A tracking registry.';"
onclick is a event
and "document.answer.Tim10.value" is a JavaScript
syntax : document.FormName.fieldName.value = "The value"
Like in this code I have used the two JavaScript syntax
1.) document.write("Strings")
2.) alert("Strings")
Example 1 :-
[HTML]<input type="submit" name="Submit" value="Submit" onclick="alert('Hello World'),document.write('Hello World')" />[/HTML]
we can write like this
Example 2 :-
[HTML]<input type="submit" name="Submit" value="Submit" onclick="JavaScript
:alert('Hello World'),document.write('Hello World');" />
[/HTML]
or
Example 3 :-
In <head>
[HTML]<script language="JavaScript" type="text/javascript">
/*<![CDATA[*/
function btnClick()
{
alert("Hello World")
document.write("Hello World");
}
/*]]>*/
</script> [/HTML]
in <body>
[HTML]<input type="submit" name="Submit" value="Submit" onclick="btnClick();" />[/HTML]
All three Example will give the same result