日期:2014-05-18 浏览次数:20440 次
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>制作模板,第一步</title> </head> <script language="javascript"> function ajaxFunction() { var xmlHttp; try{ xmlHttp=new XMLHttpRequest(); } catch(e){ try{ xmlHttp=new ActiveXObject(Msxml2.XMLHTTP); } catch(e){ try{ xmlHttp=new ActiveXObject(Msxml.XMLHTTP); } catch(e){ alert('您的浏览器不支持AJAX!'); return false; } } } xmlHttp.onreadystatechange=function() { if (xmlHttp.Readystate==4) { var dd1=document.getElementById("DropDownList1"); var index=dd1.selectIndex; var aaa=dd1.options[index].value; alert("aaa"); //这里无法执行 } } xmlHttp.open("GET","",true); //xmlHttp.send(Null); } </script> <body> <form name="form1" method="post" action="" runat="server"> <table width="80%" align="center" style="border:solid 1px #4397c5; padding:0;"> <tr style="border:solid 1px #4397c5"> <td height="27" colspan="4">新增产品页面模板</td> </tr> <tr style="margin:0px;"> <td style="width: 107px; border:solid 1px #4397c5; margin:-2px; height: 25px;">模板名称</td> <td style="width: 237px; height: 25px;"><input type="text" name="tf_module_name" value="产品模板"></td> <td style="width: 115px; height: 25px;">模板行数</td> <td width="27%" style="height: 25px"> <asp:DropDownList ID="DropDownList1" runat="server"> <asp:ListItem Value="2">2</asp:ListItem> <asp:ListItem Value="3">3</asp:ListItem> <asp:ListItem Value="4">4</asp:ListItem> </asp:DropDownList> </td> </tr> <div id="rownum"> </div> </table> <table> 里面动态生成模板的行数 </table> </form> </body> </html>
<script language="javascript"> var xmlHttp = false; function CreateXMLHttpRequest(){ try{ xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e){ xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } } function StartRequest(RequestUrl,HandleFunctionName){ CreateXMLHttpRequest(); xmlHttp.open("GET",RequestUrl,false); xmlHttp.setRequestHeader("Content-Type", "text/xml"); xmlHttp.setRequestHeader("charset", "utf-8"); xmlHttp.onreadystatechange =