<form> <input type="text" name="cajatexto"> <input type="button" value="ejemplo" onClick="this.form.cajatexto.value='HOLA VERANO'"> </form>