I am new at using MVC 4 and Javascript. I created a javascript that does not send the alert when the page is ready. I cant seem to figure out what i am doing wrong.
my code:
@{
ViewBag.Title = "Import";
}
<script type="text/javascript">
$(this).ready(function () {
alert("test");
});
</script>
<h2>Import</h2>
<form id="form1">
@Html.DropDownList("TableDDL")
</form>
what am i doing wrong ?
Try this:
Note: Make sure you have included reference of jQuery Library on your page.