开发者

ASP.Net & Javascript: <head> element

I remember my instructor last semester mentioning something about how to sequence JavaScript commands in the HEAD section of my ASP.Net document, but for the life of me, I can't find it in my notes. Are there special concerns about the order Java and other statements inthe HEAD section?

I am putting the Javascript on a .aspx page that is based on a Master Page, if that makes any difference.

Thanks 开发者_StackOverflowin advance!


No, the sequence doesn't really matter. And you don't need to put your JS in the HEAD section either, unless you're referencing an external JS file. If you're using master pages, and you need a certain JS function on a page, just create the JS function on the page, with the requisite script tags:

ASPX:

<script language="javascript" type="text/javascript">
    someFunction = function(){
        //do something
    }
</script>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜