WEB开发网
开发学院网页设计JavaScript JavaScript窗口和框架 阅读

JavaScript窗口和框架

 2010-09-14 13:19:38 来源:WEB开发网   
核心提示:54 改变浏览器状态栏文字提示1: <script language=”JavaScript”>2: window.status = “A new status message”;3: </script>55 弹出确认提示框1: <scrip

54 改变浏览器状态栏文字提示

1: <script language=”JavaScript”>
2: window.status = “A new status message”;
3: </script>

55 弹出确认提示框

1: <script language=”JavaScript”>
2: var userChoice = window.confirm(“Click OK or Cancel”);
3: if (userChoice) {
4: document.write(“You chose OK”);
5: } else {
6: document.write(“You chose Cancel”);
7: }
8: </script>

56 提示输入

1: <script language=”JavaScript”>
2: var userName = window.prompt(“Please Enter Your Name”,”Enter Your Name Here”);
3: document.write(“Your Name is “ + userName);
4: </script>

57 打开一个新窗口

1: //打开一个名称为myNewWindow的浏览器新窗口
2: <script language=”JavaScript”>
3: window.open(“http://www.liu21st.com/”,”myNewWindow”);
4: </script>

58 设置新窗口的大小

1: <script language=”JavaScript”>
2: window.open(“http://www.liu21st.com/”,”myNewWindow”,'height=300,width=300');
3: </script>

59 设置新窗口的位置


1: <script language=”JavaScript”>
2: window.open(“http://www.liu21st.com/”,”myNewWindow”,'height=300,width=300,left=200,screenX=200,top=100,screenY=100');
3: </script>

1 2 3  下一页

Tags:JavaScript 窗口 框架

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接