使用三元运算符时记得加括号。。。。

如:

@Convert.ToInt32(Request.QueryString["type"])==0?true:false :这是错误的写法

@(Convert.ToInt32(Request.QueryString["type"])==0?true:false) 这是正确的写法!!!!!!!

把后台数据存入js中当变量用

var type = '@Convert.ToInt32(Request.QueryString["type"])';
            if (type == 1) {
                $("#atf-subsidyApply").show();
            }
            if (type == 2) {
                $("#atf-youfu").show();
            }
            if (type == 3) {
                $("#atf-societyHelp").show();
            }

最新文章

  1. SVN 提交代码时提示文件已经存在解决办法
  2. C/C++程序员应聘试题剖析(转载)
  3. dedecms /install/index.php.bak Installation File Not Deleted && Executed Via Apache Analytic Vul
  4. [题解+总结]NOIP2013-2014提高组题目浅析
  5. HDU 2571 命运 动态规划
  6. android开发中R文件丢失
  7. 数学之美 zt
  8. 剑指offter-面试题7.用两个栈实现队列
  9. Qt事件和事件循环
  10. 超详细的 Linux CentOS 编译安装python3
  11. java 中的基本数据类型
  12. (原创)Verilog三段式状态机
  13. springmvc 在非controller下使用@autowired
  14. 让simplejson支持datetime类型的序列化
  15. linux笔记-多服务器同时执行相同命令
  16. Leanote 蚂蚁笔记 云笔记
  17. ETL工具总结
  18. 异步IO的概念
  19. 搜索引擎ElasticSearchV5.4.2系列二之ElasticSearchV5.4.2+kibanaV5.4.2+x-packV5.4.2安装
  20. 常用jQuery知识

热门文章

  1. SpringCloud分布式开发五大神兽
  2. OpenWrt加入iptables 支持过滤字符串
  3. android http post
  4. Disable Oracle Automatic Jobs
  5. 基于Harbor和CephFS搭建高可用Private Registry
  6. nc 传输文件
  7. python学习之str.lstrip()
  8. form表单提交数据编码方式和tomcat接受数据解码方式的思考
  9. Java类型Float&&Double
  10. Qt学习之路3---Qt中的坐标系统