1.  with (new Date()){
   setDate(getDate()+days);
   days=toUTCString();
   document.cookie = "{0}={1};expires={2};path={3}".format(name, value, days, path);
 } 错误:expected an identifier and instead saw "with"
2.window.top.location.href = window.close();
 错误:href delaration is not found
3.function Node(id, pid, name, url, title, target, icon, iconOpen, open) { this.id = id;
           ... 
错误:expected an assignment or function call and instead saw an expression
4.   document.datafrm.dataInfo.value = szSqlInfoList ;
     document.datafrm.fileInfo.value = szFjList ;
     document.datafrm.action = "index_admin_ypkInfo.jsp" ;
     document.datafrm.submit();
 错误:datafrm declaration is not found
5.if(location.search.indexOf('mainMenuItemToSlide')>=0){
var items = location.search.split('&');
for(var no=0;no<items.length;no++){
if(items[no].indexOf('mainMenuItemToSlide')>=0){
var values = items[no].split('=');
showSubMenu(false,document.getElementById('mainMenuItem' + values[1]));
initMenuIdToExpand = false;
}
}
...
错误:declaration of variable location was not found
还有一些错就不贴了
请求帮助
以前的一些错,大概就是一些语法错误,或者有些没定义的加上var就行,以上的错不知该如何改,请求高手解答