在网上搜了一下,感觉有个方法很好
<head>
<script id="news_head_js" type="text/javascript" src="/pf/common/js/news/news_head.js" param="${connProperties.fileServer}"></script>
</head>
in the file news_head.js, we can use this code to get the parameter
var scriptParam = document.getElementById('news_head_js').getAttribute('param');