Thursday 21 January 2021

jQuery - How to hide button

 

 

Watch this example on YouTube

 

@model WebApplication1.Models.OrderCustomClass

@using (Html.BeginForm("Index", "Home"))
{


}
<input type="submit" id="btnSubmit1" value="Button1" />
<input type="submit" id="btnSubmit2" onclick="HideButton()" value="Hide Button1" />

@section Scripts{
<script type="text/javascript">
    function HideButton() {
        $("#btnSubmit1").hide();
    }
</script>
}

No comments:

Post a Comment