#python #anaconda #jupyter-notebook #visual-code #html #css #javascript #http

제목크롬에서 html이 잘 작동되지 않습니다ㅠ.2020-06-08 14:00
작성자

주민하 선배님께서는 이 코드가 잘 작동된다고 하셨는데 제 크롬과 인터넷 익스플로러에서는 버튼 클릭이 되지 않습니다.ㅠ

자바스크립트 허용도 되어있습니다. 구글링을 했는데도 제 능력에선 해결이 되지 않아 다시 여쭙습니다..ㅠㅠ

<!DOCTYPE html>
<html>
<head>
    <title>My Dynamic Details Page</title>

    <script type="text/javascript">
    
    function displayInput() //Function will display a blue version of input.
    {
        var testInput = document.getElementById("name").value;

        if (testInput.length == 0)
        {
            document.getElementById("para").innerHTML = "Hey, you didn't type anything!";
        }
        else
        {
            document.getElementById("para").innerHTML = testInput;
        }
    }
    </script>
</head>

<body>

    <H1 stype="color:blue;">Let's see another button</H1>

    <input id="name" type="text"/>

    <button onclick="displayInput();">Color It</button>

    <p id="para" style="color:blue;"></p>
    
</body>

</html>
댓글
이전term project 관련 질문2020-06-08
다음이성원교수님 java script 질문2020-06-08