i want pass value 9112232453
of 1 textfield another.
i know need javascript don't know how it.
html
<form method = "post" action=""> <input type="checkbox" name="phone" value="9112232453" onclick='some_func();' > <input type="text" name="phone" value="" id="phone"> <input type="submit" name="go"> </form>
then later, want use value in php.
you use js. function take param (this.value)
like:
<script> var some_func = function (val){ var input = document.getelementbyid("phone"); input.value = val; } </script> <form method = "post" action=""> <input type="checkbox" name="phone" value="9112232453" onclick='some_func(this.value);' > <input type="text" name="phone" value="" id="phone"> <input type="submit" name="go"> </form>
Comments
Post a Comment