zoukankan      html  css  js  c++  java
  • <php>json小结

    1、页面中如果即用到jquery包,又用到js文件,要先写jquery包,再加载js文件

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <script type="text/javascript" src="jquery-1.11.2.min.js">//jquery包
    </script>
    <script type="text/javascript" src="tanchuang.js">//js文件
    </script>
    <link href="tanchuang.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    *{
        margin: 0px auto;
    }
    </style>
    </head>

     2.json中的“||”是默认值的意思

    this.config = {
            width : config.width || 300, //宽度,如果config.width的值存在就用config.width,如果不存在,就取默认值300
            height : config.height || 200, //高度,如果config.height的值存在就用config.height,如果不存在,就取默认值200
            buttons : config.buttons || '', //默认无按钮
            title : config.title || '标题', //标题
            content : config.content || '内容', //内容
            isMask : config.isMask == false?false:config.isMask || true, //是否遮罩
            isDrag : config.isDrag == false?false:config.isDrag || true, //是否移动
            };

     3.实现点击“删除”按钮弹出对话框,选择是否删除

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    </head>
    
    <body>
    <a href="delete.php" onclick="return confirm('确定删除吗?')">删除</a>
    </body>
    </html>
  • 相关阅读:
    MongoDB的简单操作
    MongoDB下载安装
    enctype="multipart/form-data" form表单提交值为null
    shiro
    json简单介绍
    Sql Server 安装
    MySQL面试常问的查询操作
    关于分页
    Vuex
    Vue基础安装(精华)
  • 原文地址:https://www.cnblogs.com/shark1100913/p/5352102.html
Copyright © 2011-2022 走看看