在里面调用一个JavaScript函数<script= "text/javascript" src= "/example.js" >



嗨,我正在尝试调用<script>标记中的一个函数。没有调用它的formatLink函数。jms.js中的所有其他函数都可以调用。我如何让它同时调用jms.js和我在脚本标记中声明的函数。。

<script type="text/javascript" src="javascript/jms.js">
function formatLink(cellvalue) {  return cellvalue+"working";}
 </script>

这样写:

<script type='text/javascript' src='javascript/jms.js'></script>
<script type='text/javascript'>
  function formatLink(cellvalue) { return cellvalue+"working"; }
</script>

每个脚本都必须在自己的<script>标签中:

<script type="text/javascript" src="javascript/jms.js"></script>
<script type="text/javascript">
    function formatLink(cellvalue) {
         return cellvalue+"working"; 
    }
</script>

最新更新