<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"> 
    <title>将服务器控件加入到JS代码中 </title> 
</head> 
<body > 
    <form id="form1" style=" text-align:center" runat="server"> 
    <div> 
<script language="javascript" type="text/javascript"> 
document.writeln(" <div id=\"divMain\" style=\"z-index: 101; left: 100px; width: 465px; position: absolute; top: 100px;"); 
document.writeln("height: 307px; background-color: #6699ff\">"); 
document.writeln(" <table style=\"width: 456px; height: 303px\">"); 
document.writeln(" <tr>"); 
document.writeln(" <td style=\"width: 100px\">"); 
document.writeln("1 <\/td>"); 
document.writeln(" <td style=\"width: 100px\">"); 
document.writeln(" 2 <\/td>"); 
document.writeln(" <td style=\"width: 100px\">"); 
document.writeln("3 <\/td>"); 
document.writeln(" <\/tr>"); 
document.writeln(" <tr>"); 
document.writeln(" <td style=\"width: 100px\">"); 
document.writeln("4 <\/td>"); 
document.writeln(" <td style=\"width: 100px\">"); 
document.writeln("5 <\/td>"); 
document.writeln(" <td style=\"width: 100px\">"); 
document.writeln("此位置加入服务器控件 <\/td>"); 
document.writeln(" <\/tr>"); 
document.writeln(" <tr>"); 
document.writeln(" <td style=\"width: 100px\">"); 
document.writeln("7 <\/td>"); 
document.writeln(" <td style=\"width: 100px\">"); 
document.writeln("8 <\/td>"); 
document.writeln(" <td style=\"width: 100px\">"); 
document.writeln("9 <\/td>"); 
document.writeln(" <\/tr>"); 
document.writeln(" <\/table>"); 
document.writeln(" <\/div>"); 
</script> 
        <asp:Button ID="Button1" runat="server" Text="服务器控件" /> </div> 
    </form> 
</body> 
</html> 
要求:将Button放入JS的此位置加入服务器控件 位置. 
层已经生成好了.Button 也好了. 
关键怎么把控件放到指定的位置. 首先:层必须由JS生成.所以现在的解决办法我大致想了想 
1.用JS控制服务器控件,把它放入层中. 
2.用.NET后台代码把控件放入层中..... 没弄啊...高人解答啊..弄好马上结贴...分给少了.补贴给.