Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

pass parameter 2 html button

<form method="get" action="c.php">
<input type="submit" id="as" value="a_submit">
<input type="hidden" value="1" name="a" id="a">
<input type="hidden" value="1" name="b" id="b">
<input type="text" value="hello" name="myText">
<input type="submit" id="bs" value="b_submit">
</form>
<script>
document.getElementById('as').onclick = function() {
   document.getElementById('b').disabled= true;;
};
document.getElementById('bs').onclick = function() {
   document.getElementById('a').disabled = true;
};
</script>
Source by www.sitepoint.com #
 
PREVIOUS NEXT
Tagged: #pass #parameter #html #button
ADD COMMENT
Topic
Name
9+5 =