zoukankan      html  css  js  c++  java
  • MVC 随记

    2014-09-04

    [1] Json

    var contact = new Object();
    contact.firstname = "Jesper";
    contact.surname = "Aaberg";
    contact.phone = ["555-0100", "555-0120"];
    
    var memberfilter = new Array();
    memberfilter[0] = "surname";
    memberfilter[1] = "phone";
    var jsonText = JSON.stringify(contact, memberfilter, "	");
    document.write(jsonText);

    JSON.stringify IE8、IE9不兼容,解决方法


    [2] popup

    $.ajaxSetup({ cache: false });

    $(document).ready(function () {
    $(".openDialog").live("click", function (e) {
    e.preventDefault();

    $("<div></div>")
    .addClass("dialog")
    .attr("id", $(this)
    .attr("data-dialog-id"))
    .appendTo("body")
    .dialog({
    title: $(this).attr("data-dialog-title"),
    close: function () { $(this).remove(); },
    modal: true,
    height: 250,
    400,
    left: 0

    })
    .load(this.href);
    });

    $(".close").live("click", function (e) {
    e.preventDefault();
    $(this).closest(".dialog").dialog("close");
    });
    });

    -------------------------------------

    <%: Html.ActionLink("Detail~~", "Detail",
    new { code=item.Name },
    new { @class = "openDialog", data_dialog_id = "aboutlDialog", data_dialog_title = "About Us"}
    )%>

  • 相关阅读:
    MySQL Server 5.0安装教程
    c++实现一个小算法
    spring core 与 context理解
    关于eclipse的mysql连接配置
    eclipse中创建一个maven项目
    Oracle中的多表查询(笛卡尔积原理)
    Vue进阶
    计算机网络基础
    java框架之springboot
    bootstrap学习
  • 原文地址:https://www.cnblogs.com/dufu/p/3956171.html
Copyright © 2011-2022 走看看