+ 3
What should I write in the html function to make the button value 'a' to appear in textbox?
12 ответов
+ 3
l have textbox with name 'shafra'
<input type="text" name="shafra"/>
and button
<button></button>
I want when I click on this button write value 'a' in this textbox
thanks for your answer
+ 2
thanks very much for your answer
+ 2
you don't understand me I want when I click on button letter a appear in textbox like the keyboard
+ 2
I want to make button when l click on it value 'a' appear in textbox
+ 2
thanks very much for your answer
you are helpful man
+ 2
no problem thanks for you
0
can you explain exactly what you mean. as in input + button = textbox "input" ?
and what do u mean by textbox
0
you can only do it in JS as far as I know. because you can submit the text, but after that only do something with it in JS.
0
I was wrong. I did it in HTML referencing JS using script tag, so only half wrong.
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<div align="center">
<form action="javascript:userInput()" name="a" method="post">
<label>User Input Here</label>
<br />
<br />
<input type="text" name="b" value=''>
<br />
<br />
<input type="submit" value="Submit"></input>
</form>
</div>
<script>
function userInput(){
alert(document.a.b.value); //Replace with your textbox code or whatever
}
</script>
</body>
</html>
You can find it in my codes under helpingOut
0
sorry still don't get it man
0
then use input button submit alert (a)
0
sorry about the earlier mistakes, glad to help