samedi 27 juin 2015

Event not firing up (onlick)

Try changing almost everything(i.e runat="server", single-double colons) Here is the try:

<head runat="server">

<script type="text/javascript" >

    function Decide() {

        document.getElementById('l').innerText = "after";

    }

</script>
</head>

<body>
    <form id="form1" runat="server">
        <button    onclick="Decide()">Click!</button>
        <asp:Label ID="l" runat="server">before</asp:Label>

    </form>
</body>

What am i doing wrong?




Aucun commentaire:

Enregistrer un commentaire