这是我的代码:
<?php
$view="Mickey Mouse";
?>
<script type="text/javascript">
function doOne(){
document.getElementById("xyz").submit();
}
function doTwo(){
document.getElementById("xyz").submit();
}
</script>
<form class="xyz" id="xyz" method='POST' accept-charset="UTF-8" action='index.php'>
<textarea rows="4" cols="60" name='article' id='article' WRAP=SOFT>
<?php echo $view;?>
</textarea>
<p>
<button type="button" name='do1' id='do1' value="do 1" onclick="doOne()">do 1</button>
<button type="button" name='do2' id='do2' value="do 2" onclick="doTwo()">do 2</button>
</p>
</form>
<?php
var_dump("POST :",$_POST);
?>
当我运行它时,表单显示[tab][tab]Mickey Mouse[tab]
而不是简单的Mickey Mouse
. 这是为什么?