当前位置: 代码迷 >> ASP.NET >> 母版页怎么使用javascript
  详细解决方案

母版页怎么使用javascript

热度:5796   发布时间:2013-02-26 00:00:00.0
母版页如何使用javascript?
母版页invoice_master:
<asp:Content   ID= "Content1 "   ContentPlaceHolderID= "ContentPlaceHolder1 "   Runat= "Server ">
        <script   language   = "javascript ">
                function   GetTotal()
                        {
                                docoment.all[ "tbxTotal "].value   =   docoment.all[ "tbxSubTotal1 "].value;
                        }
        </script>
       
        <div   style= "height:40px; ">
                <asp:textbox   runat= "server "   id= "tbxSubTotal1 "   onTextChanged= "GetTotal "> </asp:textbox> </div>
        <div> <asp:textbox   runat= "server "   id= "tbxTotal "   > </asp:textbox> </div>

</asp:content>

编译出错:
“GetTotal”不是“ASP.masterpages_invoice_master”的成员。


------解决方案--------------------------------------------------------
在page_load裡:
tbxSubTotal1.Attributes.Add( "onTextChanged ", "GetTotal() ");
  相关解决方案