The left-hand side of an assignment must be a variable,代码中使用了中文的字符
进行ajax测试,报这个错误,代码检测无误,然后就是查了相关文档
发现是符号错误,eclipse识别中文符号,就会报这个错误,而且eclipse的js里需要写冒号结尾,附个代码.
<body>
<font size="24px" color="red">当前时 间:${requestScope.nowStr}</font>
<br />
<input id="buttonID" type="button" value="点击这里实现" /> <script type="text/javascript">
function createAjax() {
var ajax = null;
try {
ajax = new ActiveXObject("microsoft.xmlhttp");
} catch (e1) {
try {
ajax = new XMLHttpRequest();
} catch (e2) {
alert("换一个浏览器吧!");
}
}
return ajax;
}
</script> <script type="text/javascript">
document.getElementById("buttonID").onclick = function() {
var ajax = createAjax();
if (ajax != null) {
alert("succeess");
} else {
alert("unsuccess");
}
};
</script>
</body>
The left-hand side of an assignment must be a variable,代码中使用了中文的字符的更多相关文章
- Python——函数入门(三)
一.变量作用域 当程序定义一个变量时,这个变量是有它的作用范围的,变量的作用范围称为变量的作用域.根据变量的位置,分为两种: 局部变量:局部变量就是在函数中定义的变量,包括参数,都是局部变量,局部离开 ...
- c语言编译器一个不会报错的陷阱
1, 由于数字1和小写字母L(l)长得特别像,特别是VS默认字体里的,所以 double a; scanf("%1f",&a); double b; scanf(" ...
- Swift 提示:Initialization of variable was never used consider replacing with assignment to _ or removing it
Swift 提示:Initialization of variable was never used consider replacing with assignment to _ or removi ...
- JStorm与Storm源码分析(二)--任务分配,assignment
mk-assignments主要功能就是产生Executor与节点+端口的对应关系,将Executor分配到某个节点的某个端口上,以及进行相应的调度处理.代码注释如下: ;;参数nimbus为nimb ...
- Effective C++ 第0章 copy constructor和copy assignment operator
拷贝构造函数(copy constructor)被用来以一个对象来初始化同类型的另一个对象,拷贝赋值运算符(copy assignment operator)被用来将一个对象中的值拷贝到同类型的另一个 ...
- 关于warning: suggest parentheses around assignment used as truth value [-Wparentheses]|的解决方法
今天,在调试的时候一直出现warning: suggest parentheses around assignment used as truth value 代码如下: if(startTime== ...
- <Effective C++>读书摘要--Ctors、Dtors and Assignment Operators<二>
<Item 9> Never call virtual functions during construction or destruction 1.you shouldn't call ...
- verilog behavioral modeling--procedural continous assignment(不用)
assign / deassgin force /release the procedural continuous assignments(using keywords assign and for ...
- Python中的passed by assignment与.NET中的passing by reference、passing by value
Python文档中有一段话: Remember that arguments are passed by assignment in Python. Since assignment just cre ...
随机推荐
- c++中for的四种用法
#include <algorithm> #include <vector> #include <iostream> using namespace std; in ...
- bzoj 3144 [Hnoi2013]切糕——最小割
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=3144 一根纵轴上切一个点,可以把一根纵轴上的点连成一串来体现.自己的写法是每个点连向前一个点 ...
- 安全关闭MySQL
想要安全关闭 mysqld 服务进程,建议按照下面的步骤来进行: 0.用具有SUPER.ALL等最高权限的账号连接MySQL,最好是用 unix socket 方式连接: 1.在5.0及以上版本,设置 ...
- 微信小程序获取用户openid,头像昵称信息,后台java代码
https://blog.csdn.net/qq_39851704/article/details/79025557
- webpack和webpack-dev-server安装配置
本文转载自:https://www.cnblogs.com/xuehaoyue/p/6410095.html 跟着Webpack傻瓜式指南(一)这个教程在安装webpack和webpack-dev-s ...
- Log4j(1)--hellloworld
创建项目: 使用的是log4j-1.2.17.jar: log4j.properties: log4j.rootLogger=DEBUG, Console ,File #Console log4j.a ...
- C++ is-a关系
首先举一个例子: 在日常生活中,我们所说的眼镜大都是带框的眼镜,但是当提起隐形眼镜时,我们想一下它属不属于眼镜呢?答案肯定是属于的.这里的隐形眼镜和眼镜就是属于 is-a 的关系. 在面向对象编程过程 ...
- 【ZZ】大型数据库应用解决方案总结 | 菜鸟教程
大型数据库应用解决方案总结 http://www.runoob.com/w3cnote/db-solutions.html
- 学习笔记之SQL 教程
SQL 教程 | 菜鸟教程 http://www.runoob.com/sql/sql-tutorial.html SQL,指结构化查询语言,全称是 Structured Query Language ...
- PMON和SMON的功能
PMON:进程监控进程进程负责在反常中断的连接之后的清理工作.例如,如果因某些原因专用服务“故障”或被kill掉,PMON就是负责处理(恢复或回滚工作)和释放你的资源.PMON将发出未提交工作的回滚, ...