xajax:xajax如何给select增加值

<?php
require_once("xajax/xajax_core/xajax.inc.php");
function testForm($formData)
{
    switch ($formData) {
         1:
                $objResponse = xajaxResponse;
                $objResponse->alert("china");
                //这如何写
                 $objResponse;
        ;
         2:
                $objResponse = xajaxResponse;
                $objResponse->alert("USA");
                 $objResponse;
        ;
    }
}
$xajax = xajax;
//$xajax->Flag("debug", true);
$xajax->registerFunction("testForm");
$xajax->processRequest;
?>
<!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; char=gb2312" />
<title>PHP+XAJAX级联菜单</title>
<?php $xajax->prJavascript("xajax") ?>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
 <select name="gaojia" id="gaojia" _disibledevent=obj.options[obj.selectedIndex].text
     alert(n);//获取文本
  }


Tags:  xajax下拉框 xajax教程 phpxajax xajax

延伸阅读

最新评论

发表评论