多了这两行,<input type="hidden" name="cardnumber" value="100100000001"><input type="hidden" name="Action" value="searchProductName">为什么就不能执行提交了????
<?
    require("../config.inc.php");
    
    if( isset($_REQUEST['Action']) && !empty($_REQUEST['Action']) && $_REQUEST['Action'] == "searchProductName" ){
        echo "productname:".$_REQUEST['productname'];
    }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<script src="./jQuery UI Autocomplete - Remote datasource_files/jquery-1.5.1.js"></script>
<script src="./jQuery UI Autocomplete - Remote datasource_files/jquery.ui.core.js"></script>
<script src="./jQuery UI Autocomplete - Remote datasource_files/jquery.ui.widget.js"></script>
<script src="./jQuery UI Autocomplete - Remote datasource_files/jquery.ui.position.js"></script>
<script src="./jQuery UI Autocomplete - Remote datasource_files/jquery.ui.autocomplete.js"></script>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<link rel="stylesheet" href="demos.css">
<link rel="stylesheet" href="jquery.ui.all.css">
<style>
    .ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
</style>
<script language="javascript">
function f_submit1(){
   if(document.myform.productname.value=="")
    {
      alert("请查询选择饮片名称!")
      document.myform.productname.focus()
      return false
    }
    if(document.myform.unit.value=="")
    {
      alert("请输入单位!")
      document.myform.unit.focus()
      return false
    }
    
 }
</script>
<script type="text/javascript">
    $(function () {
    $('input:text:first').focus();
    var $inp = $(':input');
    $inp.bind('keydown', function (e) {
        
        var key = e.which;
        //window.alert(e.ctrlKey);
        if ( key == 13 || (e.ctrlKey&&key == 13 ) ) {
            e.preventDefault();
            if(this.type=="submit")
            {
                document.myform.submit();
            }
            var nxtIdx = $inp.index(this) + 1;
            $(":input:eq(" + nxtIdx + ")").focus();
        }
    });
});
</script>
<!--<script type="text/javascript">
$(function()
{
    $("#myform input:text").keypress(function(e)
    {
        if (e.which == 13)//判断所按是否回车键
        {
            var inputs = $("#myform").find(":text");//获取表单中的所有输入框
            var idx = inputs.index(this);//获取当前焦点输入框所处的位置
            
            if (idx == inputs.length - 1)// 判断是否是最后一个输入框
            {
               // if (confirm("最后一个输入框已经输入,是否提交?"))   //用户确认
                    $("#myform").submit();    //提交表单
            }
            else
            {
                inputs[idx + 1].focus();//设置焦点
                inputs[idx + 1].select();//选中文字
            }            return false;//取消默认的提交行为
        }
    });
});
</script>-->
<script>
    var to;//setTimeout时间变量,对于输入快时可以延迟查询
    function getD(e,va){
        e=e||event;
        if( e.keyCode==38 || e.keyCode==40 || e.keyCode==13 )return;
        if(to) clearTimeout(to);
        to=setTimeout("getData('"+va+"')",100);//延迟500毫秒后再查询
    }
    function getData(va){
        $(function() {
            function log( message ) {
                $( "<div/>" ).text( message ).prependTo( "#log" );
                $( "#log" ).attr( "scrollTop", 0 );
            }
            
            $( "#productname" ).autocomplete({
                //source: "search.php",
                source: 'ajax_searchproduct.php?ts='+new Date().getTime()+'&k='+encodeURIComponent(va),
                //source: 'search.php?ts='+new Date().getTime()+'&k='+encodeURIComponent(ui.item.value),
                minLength: 2,//查询条件最少2个字符
                select: function( event, ui ) {
                    log( ui.item ?
                        "Selected: " + ui.item.value + " aka " + ui.item.id :
                        "Nothing selected, input was " + this.value );
                }
            });
        });
    }
</script>
</head><body>
<table width="736" height="127" border="1">
<form method="post" action="chufang.php" id="myform" name="myform" onSubmit="return f_submit1();">
<div class="demo">
  <tr>
    <td colspan="4">方剂类型:</td>
  </tr>
  <tr>
    <td colspan="2">
        <input type="radio" name="radiobutton" value="radiobutton" />茶剂
    </td>
    <td width="107">
        <input type="radio" name="radiobutton" value="radiobutton" />药剂
    </td>
    <td width="437">
        <input type="radio" name="radiobutton" value="radiobutton" />汤剂
    </td>
  </tr>
  <tr>
    <td colspan="4">查询药剂:</td>
  </tr>
  <tr>
    <td width="168">
        <div class="ui-widget">
            <input type="text" id="productname" name="productname" style="ime-mode:disabled;"  value="" onkeyup="getD(event,this.value)" />
        </div>
      </label>
    </td>
    <td colspan="2">
        <input type="text" name="unit" id="unit" size="6"  onblur= "if(!/^-?[1-9]\d*$/.test(value))value=value.replace(/\D/g,'')">
    </td>
    <td>
        <input type="hidden" name="cardnumber" value="100100000001">
        <input type="hidden" name="Action" value="searchProductName">
        <input type="submit" name="Input" value="添&nbsp;加" />
    </td>
  </tr>
  </form>
  </div>
  
</table>
<div class="ui-widget" style="margin-top:2em; font-family:Arial">
Result:
<div id="log" style="height: 200px; width: 300px; overflow: auto;" class="ui-widget-content"></div>
</div>
</body>
</html>