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 设置cookie注意事项
javascript 设置cookie注意事项
在Javascript 中,cookie 可以通过 document.cookie进行设置,当设置多个cookie时浏览器会自动把
它们用分号隔开。如下:
document.cookie = 'cookie1';
document.cookie ='cookie2';
alert (document.cookie) ;//输出 cookie1 ; cookie2
但是如果把第 ......
1. oncontextm 将彻底屏蔽鼠标右键
<table border oncontextmenu=return(false)><td>no</table> 可用于Table
2. <body onselectst> 取消选取、防止复制
3. 不准粘贴
4. 防止复制
5. <link > IE地址栏前换成自己的图标
6. <link   ......