function
funActive() {
document.getElementById(
'txt1'
).focus();
}
funInactive() {
).blur();
window.onload =
() {
'b1'
).onclick = funActive;
'b2'
).onclick = funInactive;
<!DOCTYPE html>
<
html
>
head
meta
charset
=
"utf-8"
/>
title
>New Page</
script
src
"js/script.js"
></
</
body
input
id
"txt1"
type
"text"
br
"b1"
"button"
value
"active"
"b2"
"inactive"