zoukankan      html  css  js  c++  java
  • 页面 笔记

    1.样式切换

    <style type="text/css">
    tr.detail-row {
        display: none
    }
    
    tr.detail-row.open {
        display: block;
        display: table-row
    }
    </style>
    
    <tr><td><a href="#" class="show-details-btn"</a></div></td</tr>
    <tr class="detail-row"><td></td</tr>
    
    <script>
    $('.show-details-btn').on( 'click', function(e) {
        e.preventDefault();//取消事件的默认动作
        $(this).closest('tr').next().toggleClass('open');//该方法检查每个元素中指定的类。如果不存在则添加类,如果已设置则删除之。这就是所谓的切换效果。
    });
    </script>

     2.日期插件

    <input type="text" name="rq" id="rq"class="form-control date" value="<s:date name='rq' format='yyyy-MM-dd' />">
    
    <script>
    $("#rq").datepicker({
        language : 'zh-CN',
        autoclose : true,
        pickDate : true,
        format : 'yyyy-mm-dd',
        minView : 'month',
        showMeridian : true
    }).on('changeDate', function() {
        $(this).datepicker('hide');
    });
    </script>

    3.douyu小窗口

    function show(rid){
    $("#flip12345").parent().remove();
    $('body').append('<div style=" z-index:999;position: fixed;bottom: 0;right: 0;"><div id="flip12345" style="height:30px;cursor: pointer;">'+rid+'<div onclick="show('+rid+')" style="float: right;">刷新</div></div><embed width="500" height="333" id="panel12345" allownetworking="all" allowscriptaccess="always" src="https://staticlive.douyucdn.cn/common/share/play.swf?room_id='+rid+'" quality="high" bgcolor="#000" wmode="window" allowfullscreen="true" allowFullScreenInteractive="true" type="application/x-shockwave-flash"><script>$("#flip12345").click(function(){if($("#panel12345").css("visibility")!="hidden"){$("#panel12345").css("visibility","hidden");}else{$("#panel12345").css("visibility","visible");}});</script></div>');
    }

    4.同步ajax

    $.ajax({
       type:"GET",
      async : false,
      url:url,
      success:function(msg){
           } });
  • 相关阅读:
    更新增加一个门店ID字段的值
    测试成功,修改能运行代码--待优化
    奶粉运营,跑数据三个模板。
    子查询返回多条报错误
    分析跑数口径与表内在关系逻辑
    NAVICAT PREMIUM 初识
    长沙生活
    金蝶用户操作
    EXCEL对比重复数据
    处理链长期检查问题
  • 原文地址:https://www.cnblogs.com/margin-gu/p/7058119.html
Copyright © 2011-2022 走看看