我有,我想只有在一定的條件滿足加載腳本,所以我想我應該這樣做: //Head tag
<script type="text/javascript" id="scriptArea" runat="server"></script>
//Rest of the page
的.cs(的Page_Load事件) if(someCondition)
{
scriptArea.InnerH
foreach (Control ctrl in Page.Controls)
{
if (ctrl is TextBox)
{
if (((TextBox)(ctrl)).Text == "")
{
helpCalss.MessageBox("Please fill the empty fields", this);