Is there any analogue in Javascript to the __FILE__ variable in PHP?

前端 未结 4 1397
一整个雨季
一整个雨季 2020-12-19 08:31

Pretty straightforward, I\'ve got a JS script that\'s included on many different sites and needs to have parameters passed to it.

It would be useful if those could b

4条回答
  •  清酒与你
    2020-12-19 08:48

    In order to do something like that you'd need to use a server side language to render the JS for you.

    I wouldn't recommend it.

提交回复
热议问题