您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

php开发之javascript第一个程序

2024/7/26 20:51:52发布36次查看
关于基本的概念在这里就不说了,我按照书上的代码敲出了自己的第一个javasript程序,也就是自己的hello world 。对自己是一个很大的鼓励。下面我把代码贴出来和大家一块学习。
index.php

test.html
html>head>metahttp-equiv=content-typecontent=text/html; charset=gb18030>scripttype =text/javascript>functioncubeme(incomingnum){if(incomingnum ==1){ returnwhat are you doing ?; }else{ returnmath.pow(incomingnum,3); }}script>title>javascript testtitle>head>body>scripttype =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);}script>body>html>
运行结果如下:
以上就介绍了php开发之javascript第一个程序,包括了方面的内容,希望对php教程有兴趣的朋友有所帮助。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product