Creates a <script>
html tag for an external script.
scriptLink($src, $type, $attr);
Parameter | Required | Default |
---|---|---|
$src | yes | |
$type | no | 'text/javascript' |
$attr | no | null |
string
Usage:
echo scriptLink('myScript.js');
Result:
<script type="text/javascript" src="myScript.js"></script>