I have multi script tags in one page and it's executed synchronously.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Document</title>
<script type="text/javascript">
first
</script>
</head>
<body>
<div>test</div>
<script type="text/javascript">
alert('2')
</script>
<div>test</div>
<script type="text/javascript">
alert('3')
</script>
<div>test</div>
</body>
</html>
I want to disable all of the following script tags such as alert(2)
, alert(3)
and so on, how can I write js on first position ?