javascriptはバックグラウンドの値を取ります.
1702 ワード
<script type="text/javascript" language="javascript">
var testInput;
<asp:Literal id="literal" runat="server"></asp:Literal>
alert(testInput);
</script>
protected void Page_Load(object sender, EventArgs e)
{
string test = "HelloWorld";
this.literal.Text = "testInput=\"" + test + "\";";
}