客户端空间,在<>里面加一个runat="server",就可以了比如<divid='aa'runat='server'oncick="message();"></div>后台代码:protectvoidmessage(){response.write(<scriptlanguage='JavaScript'>alert('HelloWorld!');</script>);}