搜索内容

前端
  • CSS实现两个层重叠与显示

    position有以下属性:static、inherit、fixed、absolute、relative static:是默认状态,没有定位,元素出现在正常的流中(忽略 top, bottom, left, right 或……

    Joe.Ye 2023-02-23
    0 0
  • CSS设置背景图片自适应屏幕

    直接设置CSS样式 .bg { background-image: url(../images/1.jpg); background-size: 100% 100%; background-repeat: no-repeat; -moz-background-size……

    Joe.Ye 2023-02-23
    0 0
  • jQuery使用笔记

    获取div的宽度 当获取div的宽度为“100%”,想获取其具体的像素值px怎么办 平常的时候获取div的宽度方法: document.getElementById("div_id").style……

    Joe.Ye 2023-02-23
    0 0
  • ajax传递map参数给后端

    必须使用json方式 $("#button_id").click(function(){ var username = $("#username").val(); var password = $("#passwor……

    Joe.Ye 2023-02-23
    0 0
  • jQuery模拟form表单提交

    <form id="checkout_form_id" action="http://www.appblog.cn/checkout" method="post" target="_blank"> ……

    Joe.Ye 2023-02-23
    0 0
  • JS定时器整理(执行一次、重复执行)

    在JavaScript中,有两个关于定时器的专用函数,分别为: 倒计定时器:timename = setTimeout("function();", delaytime); 循环定时器:timename = ……

    Joe.Ye 2023-02-23
    0 0
  • JS遍历对象、map及数组

    遍历对象 for in const user = { id: 1, name: 'Joe.Ye', age: 18 } for(let key in user) { console.log(key + ': ' + user[k……

    Joe.Ye 2023-02-23
    0 0
  • JavaScript日期格式化与日期校验

    JavaScript日期格式化与日期校验 // 日期校验 var validateDate = function (date) { // 输出当前时间 let today = dateFormat(new Date(), 'yyyy-M……

    Joe.Ye 2023-02-23
    0 0
  • JS类型转换(强制和自动的规则)

    显式转换 通过手动进行类型转换,Javascript提供了以下转型函数: 转换为数值类型:Number(mix)、parseInt(string,radix)、parseFloat(string) 转换为字符串……

    Joe.Ye 2023-02-23
    0 0
  • jQuery操作checkbox

    jQuery操作checkbox示例: $("document").ready(function() { $("#btn1").click(function() { $("[name='checkbox'……

    Joe.Ye 2023-02-23
    0 0
  • jQuery获得select/option的值和对select/option进行操作

    jQuery获取Select元素,并获取选择的Text和Value: $("#select_id").change(function(){//code...}); //为Select添加事件,当选择其中一项时触发 va……

    Joe.Ye 2023-02-23
    0 0
  • 获取select被选中option的value和text

    JavaScript原生的方法 1、获取select对象 var myselect = document.getElementById("my_select"); 2、拿到选中项的索引 var index = myselect.sele……

    Joe.Ye 2023-02-23
    0 0
  • JS跳转页面实现方式

    方式一: <script language="javascript" type="text/javascript"> window.location.href="index.php"; </script>……

    Joe.Ye 2023-02-23
    0 0
  • 使用jsonp格式的数据进行ajax跨域post请求变成get

    因为 dataType 是 jsonp 而不是 json jsonp不支持POST跨域,所以会自动转成GET 而关于jsonp为什么不支持post请求,找到的答案是jsonp为动态的script,没有同……

    Joe.Ye 2023-02-23
    0 0
  • jQuery Cannot set property ‘display’ of undefined

    原因:JQuery选择器返回的是数组 $('#payment_frame').style.display = 'block' $('#mask').style.display = 'block'……

    Joe.Ye 2023-02-23
    0 0