php开发之javascript第一个程序

关于基本的概念在这里就不说了,我按照书上的代码敲出了自己的第一个javasript程序,,也就是自己的hello world 。对自己是一个很大的鼓励。下面我把代码贴出来和大家一块学习。 index.php

<?php header(‘Content-type:text/html’);include ‘test.html’;?>

test.html

>==”text/javascript”>{if(incomingNum ==1){return “what are you doing ?”;}else{return Math.pow(incomingNum,3);}}>=”text/javascript”>var theNum =2;var finalNum =cubeme(theNum);if(isNaN(finalNum)){alert(“You should know that 1 to any power is 1.”);}else{alert(“when cubed ,” + theNum + “is” + finalNum);}>

运行结果如下:

幸福就是重复。每天跟自己喜欢的人一起,通电话,

php开发之javascript第一个程序

相关文章:

你感兴趣的文章:

标签云: