Javascript和Java应该没有直接的关系吧 - 编程吧

上一篇 | 下一篇

Javascript和Java应该没有直接的关系吧

发布: 2006-7-09 17:38 | 作者: 佚名 | 来源: 不详 | 查看: 50次

<!--
alert("支持1.3版的javascript "+
"Browser vendor:"+navigator.appName+
" Browser version:"+navigator.appVersion+
" javascript 的等于是两个´==´,而vbscript则是一个´=´ "+
eval("3"/"5"));
//-->
</script>
<pre>
字符串转化为数字: a=parseInt(´3fdsa´) , a 等于3
b=parseFloat(´3.2fdas´) b 等于3.2
c=eval("3"+"5") c 等于35

数字转化为字符串: (3+4).toString()



javascript 的基本<font style="font size=22pt;color=red">数学函数:</font>

Math.ceil(3.15) 返回>=参数的最小整数
Math.floor() 返回小于等于参数的最大整数
Math.cos()
Math.sin()
Math.tan()
Math.sqrt()
Math.round() 返回参数的整数部分
Math.log() 返回参数的自然对数
Math.pow() 返回X的Y次幂
Math.random() 返回0到1之间的随机数
Math.exp() 返回e的x次幂,




javascript 的<font style="font size=22pt;color=red">字符串处理:</font>
a="hello word".subString(2,4); 则a为:"ll"
b="username=uservalue".split("="); 则b[0]="username",b[1]="uservalue"



</pre>


html

<html>
<head></head>
<body bgcolor="green" background="hello.bmp" properties="fixed">
<pre>
<p style="color=red;font-size=51pt">
<marquee scr="right">我是武汉工程大学的学生</marquee>

我 是一个菠菜, 菠 菠 菠 菠 菠菠 菠 菠
hello, how are you?
你好啊?
下标字:H<sub>2</sub>O
上标字:3<sup>5</sup>



</p>
<a style=text-decoration:none;color=black href=left.html>你不知道这是个链接吧?</a>
</pre>
</body>
</html>


有没有爱好网页编程的啊?marquee是很拽的吧?

<marquee behavior="alternate" scrollamount="4" direction="right">
<font style=font-size=27;color:pick;font-family:华文新魏>
欢迎光临我的个人主页</font></marquee>
<BR><BR><BR><BR>
<script language=javascript>

document.write ("<marquee scrollamount=´1´ scrolldelay=´72´ direction= ´UP´ width=300´ id=´helpor_net´ height=´200´ onmouseover=´helpor_net.stop()´ onmouseout=´helpor_net.start()´ Author:redriver; For more,visit:www.helpor.net>")

document.write ("<h2><p align=´center´><font color=blue face=´黑体´>偶 然</font></h2>")
document.write ("<p align=´right´><a href=´#´ target=´_blank´><font color=blue>徐志摩</font></a> ")
document.write ("<p><font color=blue> ")
document.write ("<br>我是天空里的一片云,")
document.write ("<br>偶尔投影在你的波心?? ")
document.write ("<br>你不必讶异, ")
document.write ("<br>更无须欢喜?? ")
document.write ("<br>在转瞬间消灭了踪影。")
document.write ("<br>")
document.write ("<br>你我相逢在黑暗的海上,")
document.write ("<br>你有你的,我有我的,方向;")
document.write ("<br>你记得也好, ")
document.write ("<br>最好你忘掉, ")
document.write ("<br>在这交会时互放的光亮! ")
document.write ("</font>")

document.write ("</marquee> ")
</script>

    TAG: 编程

    字号: | 推荐给好友

     

    评分:0

    我来说两句

    seccode