Edit in JSFiddle

var myInput = document.getElementById("myInput");

function setFocus() {
	myInput.focus();
}

function setBlur() {
	myInput.blur();
}
<input type="text" id="myInput">
<br>
<button type="button" onclick="setFocus()">포커스 주기</button>
<button type="button" onclick="setBlur()">포커스 제거</button>