1.javascript
eval()的使用
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Eval动态编译</title> <script src="Public/js/jquery-1.10.2.min.js" type="text/javascript"></script> <script type="text/javascript"> function run() { var c = $("#textInput").val(); eval(c); } </script> </head> <body> <form id="form1" runat="server"> <div> <asp:Button ID="Button1" runat="server" Text="执行" OnClientClick="run();return false;" /> <br /> <asp:TextBox ID="textInput" runat="server" Height="356px" TextMode="MultiLine" Width="389px"></asp:TextBox> </div> </form> </body> </html>