function actionsoon(filename,profess,classseond)
{
var nText = 1;
nText ++;
fileobject = document.all(filename);
var prefix = profess;
var psecond = classseond;
var NC = "";
NC += "<div id=\"add\">";
NC += "<table frame=\"void\" width=\"100%\" border=\"1\" bordercolor=\"#879ebc\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#FFFFFF\" style=\"border-collapse: collapse\" id=\"hyj\">";
NC += "<tr>";
NC += "<td bgcolor=\"#F7F7F7\"><font color=\"red\">*</font>支付方式</td>";
NC += "<td bgcolor=\"#F7F7F7\">";
NC +="<select name=\"EXECUTE_INFO[]\" id=\"\" onchange=\"queryArea(this.id);\">";
NC += "<?
$sql="select subject_code, subject_name, subject_year from subject_set where account_no = '".$_GET['company']."' and subject_year = '".date("Y")."' and (subject_code like '1001%' or subject_code like '1002%') and seal_up=0 and length(subject_code)=4";
$result = mysql_query($sql);
while ($arr = mysql_fetch_array($result))
{
$subject_code = $arr["subject_year"].$arr["subject_code"];
echo "<option value=";
echo $subject_code;
if ($subject_code == $_GET['subject_code']) echo ' selected';
echo ">";
echo $str.$arr["subject_name"];
getNoteSubject11($_GET['company'],$arr["subject_code"],$arr["subject_year"]);
}
function getNoteSubject11($account_no,$subject_code,$subject_year)
{
$sql="select subject_code, subject_name, subject_level, subject_year from subject_set where account_no = '".$account_no."' and subject_year = '".$subject_year."' and subject_code like '".$subject_code."%' and length(subject_code) = '".(strlen($subject_code)+2)."' and seal_up=0 order by subject_code";
$result = mysql_query($sql);
while ($arr = mysql_fetch_array($result))
{
$subject_code = $arr["subject_year"].$arr["subject_code"];
echo "<option value=";
echo $subject_code;
if ($subject_code == $_GET['subject_code']) echo ' selected';
echo ">";
$str = str_repeat(" ",($arr["subject_level"]-1));
echo $str.$arr["subject_name"];
getNoteSubject11($account_no,$arr["subject_code"],$arr["subject_year"]);
}
} ?>";
NC +="</option>";
NC +="</select>";
NC +="<span id='area1'></span>";
NC += "</td>";
NC += "<td bgcolor=\"#F7F7F7\">备注</td>";
NC += "<td bgcolor=\"#F7F7F7\">";
NC += "<input type=\"text\" name=\"REMARK_INFO1[]\" value=\"\" size=\"8\">";
NC += "</td>";
NC += "</tr>";
NC += "</table>";
NC += "</div>";
fileobject.insertAdjacentHTML('BeforeEnd',NC);
return false;
}
function queryArea(this_id){
var obj_type = document.form1.elements["EXECUTE_INFO[]"];
var detail_type = obj_type[this_id].options[obj_type[this_id].selectedIndex].value;
alert(detail_type);
createXMLHttpRequest();
type="area1";
var url="jzjf_select_branch.php?citycode="+citycode;
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=handleStateChange;
xmlHttp.send(null);
}当我选择select 中内容时,在queryArea()函数中得不到值,如果得到了值是不是可以传给PHP页面,请各位老大帮忙看下
{
var nText = 1;
nText ++;
fileobject = document.all(filename);
var prefix = profess;
var psecond = classseond;
var NC = "";
NC += "<div id=\"add\">";
NC += "<table frame=\"void\" width=\"100%\" border=\"1\" bordercolor=\"#879ebc\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#FFFFFF\" style=\"border-collapse: collapse\" id=\"hyj\">";
NC += "<tr>";
NC += "<td bgcolor=\"#F7F7F7\"><font color=\"red\">*</font>支付方式</td>";
NC += "<td bgcolor=\"#F7F7F7\">";
NC +="<select name=\"EXECUTE_INFO[]\" id=\"\" onchange=\"queryArea(this.id);\">";
NC += "<?
$sql="select subject_code, subject_name, subject_year from subject_set where account_no = '".$_GET['company']."' and subject_year = '".date("Y")."' and (subject_code like '1001%' or subject_code like '1002%') and seal_up=0 and length(subject_code)=4";
$result = mysql_query($sql);
while ($arr = mysql_fetch_array($result))
{
$subject_code = $arr["subject_year"].$arr["subject_code"];
echo "<option value=";
echo $subject_code;
if ($subject_code == $_GET['subject_code']) echo ' selected';
echo ">";
echo $str.$arr["subject_name"];
getNoteSubject11($_GET['company'],$arr["subject_code"],$arr["subject_year"]);
}
function getNoteSubject11($account_no,$subject_code,$subject_year)
{
$sql="select subject_code, subject_name, subject_level, subject_year from subject_set where account_no = '".$account_no."' and subject_year = '".$subject_year."' and subject_code like '".$subject_code."%' and length(subject_code) = '".(strlen($subject_code)+2)."' and seal_up=0 order by subject_code";
$result = mysql_query($sql);
while ($arr = mysql_fetch_array($result))
{
$subject_code = $arr["subject_year"].$arr["subject_code"];
echo "<option value=";
echo $subject_code;
if ($subject_code == $_GET['subject_code']) echo ' selected';
echo ">";
$str = str_repeat(" ",($arr["subject_level"]-1));
echo $str.$arr["subject_name"];
getNoteSubject11($account_no,$arr["subject_code"],$arr["subject_year"]);
}
} ?>";
NC +="</option>";
NC +="</select>";
NC +="<span id='area1'></span>";
NC += "</td>";
NC += "<td bgcolor=\"#F7F7F7\">备注</td>";
NC += "<td bgcolor=\"#F7F7F7\">";
NC += "<input type=\"text\" name=\"REMARK_INFO1[]\" value=\"\" size=\"8\">";
NC += "</td>";
NC += "</tr>";
NC += "</table>";
NC += "</div>";
fileobject.insertAdjacentHTML('BeforeEnd',NC);
return false;
}
function queryArea(this_id){
var obj_type = document.form1.elements["EXECUTE_INFO[]"];
var detail_type = obj_type[this_id].options[obj_type[this_id].selectedIndex].value;
alert(detail_type);
createXMLHttpRequest();
type="area1";
var url="jzjf_select_branch.php?citycode="+citycode;
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=handleStateChange;
xmlHttp.send(null);
}当我选择select 中内容时,在queryArea()函数中得不到值,如果得到了值是不是可以传给PHP页面,请各位老大帮忙看下
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货