zoukankan      html  css  js  c++  java
  • razor使用注意点........

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

    如:

    @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();
                }

  • 相关阅读:
    2021/3/12
    2021/3/11
    2021/3/10
    2021/3/9
    2021/3/8
    2021/3/5
    2021/3/4
    2021/3/3
    2021/3/2
    2021/3/1
  • 原文地址:https://www.cnblogs.com/gaocong/p/4515059.html
Copyright © 2011-2022 走看看