tp中js在行末使用注释报错Uncaught SyntaxError: Unexpected token }

if (new_directors==1) {// 注释

解决办法:注释换成单行
if (new_directors==1) {
//注释
原因:tp似乎是模板把{//当作注释了

Thinkphp中js报错,Uncaught SyntaxError: Unexpected token }的更多相关文章

  1. vue - public 引入 <script>报错 Uncaught SyntaxError: Unexpected token '<'

    1.现象 原本我是直接在母版引入 <script type="application/javascript" src="static/config.js" ...

  2. jquery使用ajax报错[Uncaught SyntaxError: Unexpected token :]

    $.post('/ajax/validate.do',{"id": id},function(ret){ //ret }); 返回值明明是json,格式也是正确的,却解析不成功,在 ...

  3. 后台返回json字符串 页面js报错 Uncaught SyntaxError: Unexpected identifier

    后台json字符串是 [{"name": "报销申请", "id": "start"}, {"name&quo ...

  4. chrome js报错Uncaught SyntaxError: Unexpected string

    个人博客 地址:http://www.wenhaofan.com/article/20180912123136 js报错,最后发现是$(function(){})这部分()不完整 $(function ...

  5. chrome查看js报错Uncaught SyntaxError: Unexpected string

    个人博客原文http://wenhaofan.com/article/20180912123136 js报错,最后发现是$(function(){})这部分()不完整 $(function({ $(& ...

  6. 打开了chrome审查元素 发现报错 Uncaught SyntaxError: Unexpected token )

    这个错误并不影响业务处理,但是看到有报错,心里总是不爽. 经过几番查找,发现了原因. <a href="javascript:void()" oncick="onS ...

  7. vue项目npm run dev 报错Uncaught SyntaxError: Unexpected token <

    目前代码所处位置是micro分支,该分支是从dev分支直接拉下来进行npm run dev的,而dev分支是可以正常运行的,网上的诸多解释是babel转义时候报错,其实对比可见,两个分支不同的地方应该 ...

  8. JS错误:Uncaught SyntaxError: Unexpected token ILLEGAL

    $('tbody', '#' + tableId).append('<tr onmouseover="this.style.backgroundColor=\'#eeeeee\'&qu ...

  9. HTML5 plus 报错 Uncaught SyntaxError: Unexpected identifier at XXXX.html:1

    最近使用 VUE2.X + muse-ui  + HTML5 plus 开发webApp 调用HTML5 plus报错,错误提示如下 Uncaught SyntaxError: Unexpected ...

随机推荐

  1. Arduino LiquidCrystal库函数中文对照

    我之所以会试试看LCD+Shield,一是因为我本来就有这块板,但一直不会用,第二个原因则是Arduino+Cookbook这本书.O’Reilly的这本手册对你在Arduino实践中的各种问题(几乎 ...

  2. dac mssql server

    unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System ...

  3. POJ 3013 SPFA算法,邻接表的使用

    Big Christmas Tree Time Limit: 3000MS   Memory Limit: 131072K Total Submissions: 19029   Accepted: 4 ...

  4. pandas中DataFrame重置设置索引

    在pandas中,经常对数据进行处理 而导致数据索引顺序混乱,从而影响数据读取.插入等. 小笔总结了以下几种重置索引的方法: import pandas as pd import numpy as n ...

  5. tensorflow笔记(北大网课实战)

    1. tf.multiply(x,y1) # 对应元素相乘 tf.matmul(x,y2) # 矩阵相乘 2.会话:执行计算图中的节点运算的. with tf.Session() as sess: p ...

  6. goahead(web服务器)分析

    一.参考网址 1.源码的github地址 二.网页是采用文件读写方式,还是转换为数组方式? 1)其通过宏定义“WEBS_PAGE_ROM”来区分,我是在websPageReadData()(page. ...

  7. FileReader笔记

    FileReader API链接地址:https://developer.mozilla.org/en-US/docs/Web/API/FileReader 实例代码: <!DOCTYPE ht ...

  8. 操作实践,IDEA自定义toString()方法模板

    声明:迁移自本人CSDN博客https://blog.csdn.net/u013365635 Java POJO在日志中常会用于打印,经常会将POJO的内容全部或部分打印出来,所以POJO类的toSt ...

  9. layui select恢复默认值

  10. pip anaconda 添加国内镜像

    源地址 官方默认镜像太慢.换成国内源比较快.几个源的地址: 清华:https://pypi.tuna.tsinghua.edu.cn/simple 阿里云:http://mirrors.aliyun. ...