javascript 调用 jsp的变量
找下面写法。
注意,加单引号,第2个百分号之前没有空格,而在jsp中调用的话要空格。
You may be get some help from the code below.
<%
String str="str";
%>
<script>
function accessVar(){
var varStr='<%=str%>';
alert(varStr);// here will diplay 'str'
}
</script>
相关文档:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor
*/
var File = {
name:'',
path:'',
ext:'',
cfiles:[],
attributes:{
  ......
Javascript 正则表达式使用手册
Javascript 2008-10-30 10:15 阅读97 评论0
字号: 大大 中中 小小
一.正则表达式匹配常用语法
“+”字符:规定表达式字符出现一次或多次。
“*”字符:规定表达式字符出现零次或多次。
“? ......
脚本中的事件有2种模型
1、 冒泡型事件:事件是按照从最特定的目标到最不特定的事件目标(document)的顺序依次触发。这是针对不同元素的同一事件类型
如:
<html onclick=”handleClick()”>
<head></head>
<body onclick=”handleClick()”>
<div ......
//关闭,父窗口弹出对话框,子窗口直接关闭
this.Response.Write("<script language=javascript>window.close();");
//关闭,父窗口和子窗口都不弹出对话框,直接关闭
this.Response.Write("");
this.Response.Write("{top.opener =null;top.close();}");
this.Response.Write("");
//弹出窗口刷新当前页面width=20 ......
1. oncontextm 将彻底屏蔽鼠标右键
<table border oncontextmenu=return(false)><td>no</table> 可用于Table
2. <body onselectst> 取消选取、防止复制
3. 不准粘贴
4. 防止复制
5. <link > IE地址栏前换成自己的图标
6. <link   ......