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

제목[re]Java Script1 재질문2020-06-07 18:46
작성자

오타를 수정했는데도 버튼 클릭이 되지 않습니다..ㅠㅠ

<!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>
댓글
이전Java Script12020-06-06
다음텀프 질문2020-06-06