Register On-Click Event with jQuery - Not Firing

后端 未结 2 735
温柔的废话
温柔的废话 2021-01-22 00:38

Should be a quickie ...

1) I created a new project in VS2013 using MVC.
2) I added the following code to the bottom of the default Home\\Index.cshtml that is created

2条回答
  •  臣服心动
    2021-01-22 01:15

    According to w3.org (emphasis mine):

    The script may be defined within the contents of the SCRIPT element or in an external file. If the src attribute is not set, user agents must interpret the contents of the element as the script. If the src has a URI value, user agents must ignore the element's contents and retrieve the script via the URI.

    That's to say, you can't specify both a src and a body for your script element and expect both to work... so, use two separate script elements.

    
    
    

提交回复
热议问题