global jquery function

后端 未结 2 1528
-上瘾入骨i
-上瘾入骨i 2021-01-17 22:37

I have to write global function in js file that is loaded initially. I want to write function on it so that it can be accessed from all pages. I am new in jquery. I want to

2条回答
  •  伪装坚强ぢ
    2021-01-17 23:33

    You can define the functions in js file and just include these js files in the pages where you want to use it using script tag.

    All the functions defined in the js files will become global and can be used anywhere on the page or in other js files.

    
    
    

提交回复
热议问题