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

제목Java Script12020-06-06 19:57
작성자

html6.html 을 그대로 따라 썼는데 Color it 을 눌러도 반응이 없습니다 ㅠㅠ

교수님께서 괄호를 하나 안쓰셔서 제대로 동작을 안할 수 있다고 하셨는데

전 괄호 모두 쓴 것 같고 개발자 도구에서 에러메시지도 보이지 않습니다..ㅠㅠ


아래는 제 소스코드입니다.


<!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").innterHTML = 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>
댓글
이전파이썬 소스코드2020-06-06
다음[re]Java Script1 재질문2020-06-07