javascript framework, JS常用函数(方法),jQuery
//Register NameSpace for window.MSN
if(!window.MSN)
{
window.MSN = {};
}
if(!window.MSN.SET)
{
window.MSN.SET = {};
}
if(!window.MSN.SET.Utilities)
{
window.MSN.Utilities = {};
}
//Check you borwse type
//IE7 &IE8 & FF etc can render hover for div tags, but can't render under IE6.0
//this function can render hover for div under IE6.0 browse
//
MSN.SET.Utilities = {
WebBrowserType: { IE6: 'MSIE 6.0', IE7: 'MSIE 7.0', IE8: 'MSIE 8.0', Firefox: 'Mozilla', Unknow: 'unknow' },
checkUserWebBrowser:function(){
var userAgent = window.navigator.userAgent;
if(userAgent.indexOf(MSN.SET.Utilities.WebBrowserType.IE8) > -1) {
return MSN.SET.Utilities.WebBrowserType.IE8;
}
if(userAgent.indexOf(MSN.SET.Utilities.WebBrowserType.IE7) > -1) {
return MSN.SET.Utilities.WebBrowserType.IE7;
}
if(userAgent.indexOf(MSN.SET.Utilities.WebBrowserType.IE6) > -1){
return MSN.SET.Utilities.WebBrowserType.IE6;
}
if (userAgent.indexOf(MSN.SET.Utilities.WebBrowserType.Firefox) > -1) {
return
相关文档:
1.document.formName.item("itemName") 问题
说明:IE下,可以使用document.formName.item("itemName")或
document.formName.elements["elementName"];Firefox下,只能使用
document.formName.elements["elementName"].
解决方法:统一使用document.formName.elements["elem ......
今天有人来公司推销网站安全扫描软件,演示了对JS的跨域脚本注入风险的扫描,以前没意识到,今天有所了解。如果您的程序页面有以下情况,那么JS脚本注入的风险就很大:
1)页面打开时,URL 有某个参数,例如 XXPage.aspx?XXParam=XXValue
2)aspx页面里有如下代码:
<script>
&nb ......
一、在HTML中嵌入Javasript的方法
1、直接在Javascript代码放在标记对<script>和</script>之间
2、由<script. />标记的src属性制定外部的js文件
3、放在事件处理程序中,比如:<p nclick="alert('我是由onclick事件执行的Javascript')">点击我</p>
4、作为URL的主体,这个URL使用特殊的J ......
<%@ page language="java" import="java.util.*,com.page.wash.giveclothing.*" pageEncoding="gbk"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>添加表格信息</title>
<meta http-equiv="pragma" content="no-c ......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>JavaScript实现隔行变色的表格</title>
<style>
<!--
.datalist{
border:1px solid #007108; /* 表格边框 * ......