<html>
<head>
<meta charset="utf-8">
<script language="javascript">
// String str = "hello world" ;
/*
var str = "hello world";
alert(typeof str);
str = 9999 ;
alert(typeof str);
*/
/*
var person = new Object();
person.pid = "p001";
person.pname="鸠摩智";
alert(person.pid+"_"+person.pname);
*/
//java 方法
public String hello(String name){
return "hello to " + name ;
}
//js 方法
function hello(num1 , num2 , name){
if(num1>num2){
return "hello to" + name ;
}else{
alert("HELLO");
}
}
</script>
</head>
<body>
</body>
</html>
<!--
Javascript : 客户端的一个脚本语言
js是一门弱类型的语言 , 变量的数据类型由后面赋的值的类型决定
-->