HTML <script> element
<script type="text/javascript">
var d = new Date();
var ms = Date.parse("April, 7, 2000");
alert(ms);
</script>
Specific attributes of <script> tag:
Attribute | Description |
async | execute the script asynchronously. HTML only |
type | text/javascript, text/vbscript, text/ecmascript, application/javascript, application/ecmascript |
charset | encoding language |
defer | true: excute the script immmediately; false: excute the script after the page loaded |
src | URL of the script |