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 ...
随机推荐
- JavaScript decodeURI()与decodeURIComponent() 使用与区别
decodeURI()定义和用法:decodeURI()函数可对encodeURI()函数编码过的URI进行解码.语法:decodeURI(URIstring)参数描述:URIstring必需,一个字 ...
- Python学习思维导图
刚学习Python时,边学边总结的,采用思维导图的形式, 适合回顾使用.内容参考<Python:从入门到实践>一书. 再给出一张Datacamp网站上的一张关于Python基础的总结 ...
- Servlet技术基础
由于Servlet部分涉及较多的类,要想尽快掌握Servlet基础,必须熟悉使用这些类之间的关系以及其常用的方法. 主要讲解部分包括: 1)通过实现Servelt接口来编写Servlet 2)熟悉Se ...
- bzoj 5020(洛谷4546) [THUWC 2017]在美妙的数学王国中畅游——LCT+泰勒展开
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=5020 https://www.luogu.org/problemnew/show/P4546 ...
- jmeter 目录内容分布
/bin 目录(常用文件介绍) examples:目录下包含Jmeter使用实例 ApacheJMeter.jar:JMeter源码包 jmeter.bat:windows下启动文件 jmeter.s ...
- [转]JAVA 反射及使用
<%@page contentType="text/html; charset=GBK"%> <%@page import="java.security ...
- spring 源码如何导入到eclipse
spring 源码如何导入到eclipse spring源码解析——spring源码导入eclipse spring framework源码下载并导入eclipse
- 在 Laravel 5 中使用 Laravel Excel 实现 Excel/CSV 文件导入导出功能
1.简介 Laravel Excel 在 Laravel 5 中集成 PHPOffice 套件中的 PHPExcel ,从而方便我们以优雅的.富有表现力的代码实现Excel/CSV文件的导入和 导出 ...
- 第八章 Mixer 适配器的应用
概述: Mixer “知晓”每一次服务间的调用过程,这些调用过程会为Mixer提供丰富的相关信息,Mixer通过接入的适配器对这些信息进行处理,能够在调用的预检(执行前)和报告(执行后)阶段执行多种任 ...
- 二货Mysql中设置字段的默认值问题
Mysql设置字段的默认值的确很落伍 1.不支持函数 2.只支持固定常量. 经常用到的日期类型,因为不支持getdate或者now函数,所以只能设置timestamp类型 而且还必须在默认值那个地方写 ...