<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>