SyntaxError: identifier starts immediately after numeric literal错误解决办法

今天在项目中 用ajax跳转并在url中传数据时遇到了一个语法错误

function save(flag,checkFlag){
        $(‘#allInfoForm‘).ajaxSubmit({
            dataType : ‘json‘,
            type : "post",
            data:{"operationFlag":flag,"checkFlag":checkFlag,"applicationId":‘$!applicationId‘},
            success : function(data) {
                if (data.success) {
                    Dialog.message(data.message,"提示", function() {
                     self.location.href=contextPath+"/intopieces/applyintopiecewait/change.page?applicationId="+‘$!applicationId‘+"&customerId="+‘$!customerId‘+"&applyQuota="+‘$!applyQuota‘+"&serialNumber="+‘$!serialNumber‘;
                     });
                } else {
                    Dialog.message(data.message);
                    return false;
                }
            },
            error : function(data) {
                Dialog.closeLoad();
                Dialog.message("操作失败");
                return false;
            }
        });
    }

SyntaxError: identifier starts immediately after numeric literal

参数的值为:

applicationId 402881e74a384553014a385826a70003
applyQuota 1000
customerId 0000000049bb6a710149bb872c1d0007
serialNumber 402881e74a384553014a385882e5000d

解决办法:

?applicationId="+‘$!applicationId‘+"&customerId="+‘$!customerId‘+"&applyQuota="+‘$!applyQuota‘+"&serialNumber="+‘$!serialNumber‘;

拼接时 把要传的数据用‘‘括起来 即可。
时间: 2024-08-29 23:46:23

SyntaxError: identifier starts immediately after numeric literal错误解决办法的相关文章

错误:SyntaxError: identifier starts immediately after numeric literal

转载:http://blog.csdn.net/shalousun/article/details/39995443在用JavaScript时,当你使用一个字符传作为函数的参数常常会看到语法错误,在firebug下会报SyntaxError: identifier starts immediately after numeric literal ,当然在google下提示就不准确了. 错误原因是:标识符以数字开头 下面直接看例子吧: $(function(){ var str = "509edb

mongo collection name—SyntaxError: identifier starts immediately after numeric literal

当mongo collection的名字当中存在特殊字符时,在shell中对改集合进行操作会报SyntaxError: identifier starts immediately after numeric literal的错误. 解决办法:getCollection函数将collection name转换一下即可 例: order_cluster:PRIMARY> db.getCollection("order_2017-08").find().count()12991689

SyntaxError:identifier starts immediately after numeric literal

1.错误描述 2.错误原因 由于在修改方法传参的过程,需要传个id,但是这个id是字符串类型,传入的是数值型 3.解决办法 在传参时,需要添加"",变成字符串类型 User.modify("id");

错误记录SyntaxError: identifier starts immediately after numeric literal

<a href="javascript:deleBook(${b.id})"> 错误格式 <a href="javascript:deleBook('${b.id}')"> 正确格式 当传递的参数是字符串时并以数字开头,需要添加引号标识. EL表达式表达的字符串以数字开始 5a9ks-dh5a1sd,提示错误

identifier starts immediately after numeric literal

错误情况: var curtopicid=${topicModel.topicid }; 解决: var curtopicid='${topicModel.topicid }'; <a class="js-673810" hidefocus="true" href="javascript:showReply('${topicModel.topicid }')">评论(${topicModel.replycount})</a>

IE6,IE7,IE8下报JS错误:expected identifier, string or number的原因及解决办法

今天在调试一个页面的时候遇到一个问题,在IE9下运行得很好的脚本,在IE8里打开的时候弹出错误:expected identifier, string or number,按照经验,应该是定义对象的时候最后一个属性末尾跟了逗号,但检查一遍后没发现有这种情况,后来仔细看了一下报错的位置,发现有定义json对象属性时,属性名没有用引号括起来,于是加了上去再试,问题解决了. 综上所述,当出现expected identifier, string or number的错误时,你首先应该检查在使用对象字面

error C2039: &#39;SetDefaultDllDirectories&#39;错误解决办法

使用VS2013+WDK8.1+Win7开发UMDF驱动,当使用了CComPtr类,包含了atlcomcli.h头文件却报错,错误如下: Error 3 error C2039: 'SetDefaultDllDirectories' : is not a member of '`global namespace'' 可是使用VS2012+WDK8.0+Win7却没有这个问题. 经过一番折腾终于找到了解决办法,在预定义中增加一项定义  _USING_V110_SDK71_ 具体见下图: error

Ubuntu提示piix4_smbus:Host SMBus错误解决办法

1.编译内核时出现下面的错误 CHK     include/linux/version.h CHK     include/generated/utsrelease.h make[1]: `include/generated/mach-types.h' is up to date. CALL    scripts/checksyscalls.sh CC      scripts/mod/empty.o /opt/FriendlyARM/toolschain/4.5.1/lib/gcc/arm-

AD09 &quot;Access violation at address 0C241A06 in module &#39;IntegratedLibrary.DLL&quot; 错误解决办法

regedit-将HKEY_CURRENT_USER\Software\AltiumDesignerWinter09\DesignExplorer\Preferences\IntegratedLibrary\Loaded Libraries下面的所有内容删除,重新打开altium designer添加库即可. AD09 "Access violation at address 0C241A06 in module 'IntegratedLibrary.DLL" 错误解决办法