Why console.log can't be used

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
    <input type="text" value="test">
    <input id="submit_button" type="button" value="submit">
    <p id="prompt">test

<script> function sendData() { console.log("it is a test"); var xmlHttp = new XMLHttpRequest(); xmlHttp.open("post", "test.php",true); xmlHttp.send("iq=test"); xmlHttp.onreadystatechange = function(){ if (xmlHttp.readyState == 4 && xmlHttp.status == 200){ document.getElementById("prompt").innerHTML = xmlHttp.responseText; } } } ob = document.getElementById("submit_button"); ob.addEventListener("click",sendData); </script> </body> </html>

test.php is as follows

<?php
echo "it is a test";
?>

after clicking button, I found that console.log ("it is a test"); was not running.

excuse me, what is the reason for this?

Dec.09,2021

you see if Filter has dropped
if there is Filter, empty Filter, then take a look at
and take a look at the level displayed, and choose it as the default

.

Menu