解决方案 »
- java ee还会用jsp+servlet+javabean吗?老师说今后不会用它做,与其用它,不如用php
- java swing做的登陆界面,怎样判断数据库中用户名和密码?
- 为什么返回jsp页面到浏览器端不带有java代码
- 我是学java ee的,现在想学一个JavaScript的框架,有那么多,请大家推荐一个好吗,谢谢
- 这些代码为什么打印不出来
- java远程关机代码
- 我的struts为什么访问不了资源文件。。
- 高手急救!Jbuilder2005下用AXIS实现运行于WEBLOGIC8下的服务问题?
- 用ant的时候调用junit的问题
- xml解析问题
- JSP中out输出问题
- commons-io.1.1版本的疑问
<head>
<script language="javascript">
var pub = "全局变量"
var v1;
function sayHello(){
v1 = parseInt(document.getElementById("number1").value);
alert("pub是" + pub + ",可以提示出来。");
}function test(){
//v1 = parseInt(document.getElementById("number1").value) ;
alert(v1);
alert("v1也是全局变量,但是总提示没有定义。");
}
</script>
</head>
<!-- 在页面载入时执行 -->
<body onload="sayHello()">
<input type = 'text' name = 'number1' id = 'number1'><p>
<input type = 'button' name = 'button' id = 'button' value ='显示' onclick = "test()">
</body>
</html>
<head>
<script language="javascript">
var pub = "全局变量"
var v1;
function sayHello(){
v1 = parseInt(document.getElementById("number1").value);
alert("pub是" + pub + ",可以提示出来。");
alert(v1);
}function test(){
v1 = parseInt(document.getElementById("number1").value) ;
alert(v1);
}
</script>
</head>
<!-- 在页面载入时执行 -->
<body onload="sayHello()">
<input type = 'text' name = 'number1' id = 'number1'><p>
<input type = 'button' name = 'button' id = 'button' value ='显示' onclick = "test()">
</body>
</html>