易截截图软件、单文件、免安装、纯绿色、仅160KB

JavaScript中confirm,alert,prompt的用法

本文简要介绍JavaScript中confirm,alert,prompt的用法,希望大家学习过程中能得到一些启发。
window.confirm 参数就只有一个。显示提示框的信息。按确定,返回true;按取消返回false。
< SCRIPT> var bln = window.confirm("确定吗?"); alert(bln) < /SCRIPT> window.alert参数,只有一个,显示警告框的信息;无返回值。
< SCRIPT> window.alert("确定。") window.prompt参数,有两个,第一个参数,显示提示输入框的信息。第二个参数,用于显示输入框的默认值。返回,用户输入的值。
< SCRIPT> var str = window.prompt("请输入密码","password") alert(str); < /SCRIPT>


相关文档:

[翻译]High Performance JavaScript(023)

Data Formats  数据格式
    When considering data transmission techniques, you must take into account several factors: feature set, compatibility, performance, and direction (to or from the server). When considering data formats, the only scale you need for comparison is speed.
......

[翻译]High Performance JavaScript(029)

Working Around Caching Issues  关于缓存问题
    Adequate cache control can really enhance the user experience, but it has a downside: when revving up your application, you want to make sure your users get the latest version of the static content. This is accomplished by renaming ......

[翻译]High Performance JavaScript(031)

Firebug
    Firefox is a popular browser with developers, partially due to the Firebug addon (available at http://www.getfirebug.com/), which was developed initially by Joe Hewitt and is now maintained by the Mozilla Foundation. This tool has increased the productivity of web develop ......

用JavaScript写的小时候玩的乒乓球小游戏

由于火狐浏览器不支持“removeNode”函数,所以一下代码只支持IE.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
< ......

如何我javaScript获取窗口的高度和宽度

在javascript中得到当前窗口的高和宽
<body><SCRIPT LANGUAGE="JavaScript">
var  s = "";
s += "\r\n网页可见区域宽:"+ document.body.clientWidth;
s += "\r\n网页可见区域高:"+ document.body.clien ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号