js

dom

1. script内写document.write

2.body中: <button type ="button" onclick = "alert('welcome')">click here </button>

3.改变值:   <p id ="demo">javascript change the text</p>
<script>
    function myFuncton () {
        x= document.getElementById("demo");
        x.innerHTML="HELLO JAVASCRIPT";
    }
</script>
<button type ="button" onclick = "myFuncton()">click here </button>

4. NaN:not a number            isNaN()判断输入的值不是一个数值

 

posted @ 2014-08-24 22:40  长清  阅读(106)  评论(0编辑  收藏  举报