HTML
新老农
这个作者很懒,什么都没留下…
展开
-
第一个select选择不同选项,给第二个select赋不同值
第一个select选择不同选项,给第二个select赋不同值原创 2022-11-23 17:01:04 · 452 阅读 · 0 评论 -
element ui 中el-button按钮 , 动态设置el-button的type 即显示颜色
element ui 中el-button按钮 , 动态设置el-button的type 即显示颜色原创 2022-07-15 17:44:19 · 10807 阅读 · 0 评论 -
路由、控制器、页面两种写法
路由: $router->get('getModifylog', SamProofingController::class.'@getModifylog'); //修改日志控制器public function getModifylog(Request $request){ $id = $request->notice_id; try { $data = ProofingNoticeVer::where(["notice_i原创 2022-01-13 17:30:12 · 192 阅读 · 0 评论 -
http_build_query()函数使用方法
http_build_query()函数的作用是使用给出的关联(或下标)数组生成一个经过 URL-encode 的请求字符串。写法格式:http_build_query ( mixed $query_data [, string $numeric_prefix [, string $arg_separator [, int $enc_type = PHP_QUERY_RFC1738 ]]] )打个比方:$data = array(“name”=>“callback” , “value”=>“原创 2022-01-13 14:45:33 · 809 阅读 · 0 评论 -
详解 $_SERVER 函数中QUERY_STRING和REQUEST_URI区别
实例:1,http://localhost/aaa/ (打开aaa中的index.php)结果:$_SERVER[‘QUERY_STRING’] = “”;$_SERVER[‘REQUEST_URI’] = “/aaa/”;$_SERVER[‘SCRIPT_NAME’] = “/aaa/index.php”;$_SERVER[‘PHP_SELF’] = “/aaa/index.php”;2,http://localhost/aaa/?p=222 (附带查询)结果:$_SERVE原创 2022-01-13 14:44:59 · 328 阅读 · 0 评论 -
初始化下拉框多选 multiple=“multiple“,下拉框单选,数据列表datalist
<div class="layui-tab-item layui-show" > <div class="panel-body" style="padding: 0px !important;"> <div class="tables-container" style="overflow: auto;"> &...原创 2022-01-03 17:42:10 · 851 阅读 · 0 评论 -
动态生成html + script
<table class="table" id="grid-table"> <thead> <tr class="row_head"> </tr> <tr style="margin-bottom: 5px;" class="row_size"> </tr> </thead> </table...原创 2021-11-25 15:51:18 · 489 阅读 · 0 评论 -
引用富文本编辑器
<link rel="stylesheet" href="/layui-v2.5.6/layui/css/layui.css" media="all"><link rel="stylesheet" href="/vue/index.css"><link rel="stylesheet" href="/vue/vue.css"><div class="box box-info header" style="border-top-color:white;">原创 2021-10-20 15:49:29 · 146 阅读 · 0 评论 -
动态生成html
<tbody class="js-material-lists"> </tbody> <template class="template-tpl"> <tr class="init_row"> <td> {{--权限控制--}} <button class="btn btn-default btn-sm" data-toggle="modal" dat.原创 2021-10-11 17:28:11 · 536 阅读 · 0 评论 -
js动态生成html
1、生成html动态生成showView <div class="showView"> </div>异步获取数据:var del_id = ""; function del(e,notice_id) { del_id = notice_id; $(".del_modal_id").val(del_id) $.ajax({ url: "/admin/samproofing/getNotice", type原创 2021-10-11 16:06:56 · 3573 阅读 · 0 评论 -
利用TCPDF将html页面转换为PDF格式
使用TCPDF首先从TCPDF官网获取最新版本:http://www.tcpdf.org。官网提供了几十个示例以及说明文档,下载解压后一定要注意文件路径,如何使用TCPDF,可以从以下5个步骤完成:1、require_once导入tcpdf.php文件及相关配置信息;2、实例化TCPDF;3、设置PDF文档的格式,包括文档信息、页眉、页尾、字体、外间距、图片边框、分页等;4、导入PDF文档的内容,可以是单行或多行简单字符串,也可以HTML格式的字符串等;5、输出PDF文档。public func转载 2021-06-25 10:28:09 · 1532 阅读 · 1 评论 -
tcpdf 打印PDF字体乱码,通过视图解决方法
路由routes.php $router->get('charge', SamProofingController::class.'@charge'); $router->get('totalCharge', SamProofingController::class.'@totalCharge')->name('totalCharge'); $router->get('printCharge', SamProofingController::cl原创 2021-06-22 16:18:37 · 465 阅读 · 0 评论 -
JavaScript中window.open()和Window Location href的区别
var originUrl = window.location.href;var valiable = '/admin/samproofing/printCharge?';//url加参数 ,不刷新页面window.history.pushState(null, null, valiable + back_url);//url加参数 ,刷新页面// var currentUrl = window.location.href.split(’#’)[0];// window.location.hr原创 2021-06-22 14:35:34 · 1219 阅读 · 0 评论 -
模板里嵌套子模板
款式下,新增色组,色组是套装<link rel="stylesheet" href="{{ \Illuminate\Support\Facades\URL::asset('common/common.css') }}"><link rel="stylesheet" href="{{ \Illuminate\Support\Facades\URL::asset('common/bulk_load.css') }}"><link rel="stylesheet" href=原创 2021-05-10 16:07:44 · 207 阅读 · 0 评论 -
PHP 二维数组根据某个字段排序
二维数组根据某个字段排序有两种办法,一种是通过sort自己写代码,一种是直接用array_multisort排序函数一. 手写arraysortPHP的一维数组排序函数:sort 对数组的值按照升序排列(rsort降序),不保留原始的键ksort 对数组的键按照升序排列(krsort降序) 保留键值关系asort 对数组的值按照升序排列(arsort降序),保留键值关系方法: 取出要排序的值组成值数组(为一维数组),按要求对值进行排序(保持键值关系),遍历值数组,按照键对应赋值给结果数组。f转载 2021-05-08 16:38:59 · 1393 阅读 · 0 评论 -
checkbox控制 有数量 必选,无数量可取消
<div class="panel panel-default" style="margin-bottom: 10px;"> <div class="panel-heading">尺码数量</div> <div class="panel-body " > <div class="form-group"> <div cl.原创 2021-05-06 17:46:13 · 427 阅读 · 0 评论 -
在表单提交之前,判断表单的填写是否完整
**在提交按钮加事件onclick()=“return a()”在script加函数 a() 判断**我在onclick事件中加了一个返回值,这样当浏览器窗口弹出警告框提示我们漏填信息,我们点击确定按钮时,浏览器不会清除我们原本填写好的信息。...原创 2021-05-04 14:02:18 · 1223 阅读 · 0 评论 -
HTML 竖排文字并限制单元格的高度
从右到左排列 <tr> <td style="writing-mode: tb-rl; height:auto; width:inherit" height="100" width="100" valign="top" align="left"><div style="height:100px;">竖排文字竖排文字竖排文字竖排文字竖排文字竖排文字</div></td> </tr>这样即可: <td cols原创 2021-04-30 11:56:49 · 229 阅读 · 0 评论 -
php生成二维码
(1)下载类库文件php类库PHP QR Code,地址:http://phpqrcode.sourceforge.net/https://sourceforge.net/projects/phpqrcode/(2)放到项目里把下载的文件解压后有个phpqrcode.php文件,复制放到项目里public function eweima(){ include_once('../vendor/phpqrcode/phpqrcode.php'); //保存的路径原创 2021-04-22 15:20:05 · 1803 阅读 · 0 评论 -
php实现当前月份的前12个月和后12个月(输出近一年和未来一年的月份)
用到函数:date(‘Y-m’,strtotime(’-1month’));//本月的上一月,循环减就能得到近12个月份//获取近12个月function monthpast(){str=array();for(str = array(); for(str=array();for(i=0;i<12;i<12;i<12;i++){str[str[str[i] =date(‘Y-m’,strtotime(’-’.i.′month′));//i.'month'));原创 2021-04-16 10:24:22 · 903 阅读 · 0 评论 -
js判断一个数组是否包含一个指定的值
js判断一个数组是否包含一个指定的值,几种方法 总结一下:1:array.indexOf 此方法判断数组中是否存在某个值,如果存在返回数组元素的下标,否则返回-1。let arr = ['something', 'anything', 'nothing', 'anything'];let index = arr.indexOf('nothing');console.log(index) //结果是22. array.includes(searchElement[, fromIndex])原创 2021-04-10 15:09:18 · 2732 阅读 · 0 评论 -
checkbox选中或反选中,全选的写法
<table class="table" id="grid-table"> <thead> <tr> <th style="width:50px;text-align: center;">尺码</th> <!-- 尺码循环开始 -->..原创 2021-04-10 14:40:25 · 212 阅读 · 0 评论 -
input下拉选择框可以自行输入也可以下拉选择
使用的是原生H5标签 datalist <input class="browsers" list="browsers"> <datalist id="browsers"> <option value="清醒"> <option value="嗜睡"> <option value="烦躁">原创 2021-03-30 17:11:30 · 969 阅读 · 1 评论 -
网页错误代码大全
常在网上飘,哪能不挨刀?相信大家在浏览网页的时候都碰到过404、403之类的错误报告,不管为什么反正就是网页打不开了。其实这些都是服务器接到浏览器访问请求后返回的状态码(专业术语叫服务器信息头),不同的代码有着不同的含义,简单了解一些非常有助于搞清到底哪里出了问题、究竟该如何解决。HTTP 400 – 请求无效HTTP 401.1 – 未授权:登录失败HTTP 401.2 – 未授权:服务器配置问题导致登录失败HTTP 401.3 – ACL禁止访问资源HTTP 401.4 – 未授权:授权被原创 2021-03-02 14:14:04 · 10562 阅读 · 0 评论 -
SweetAlert用法详细说明
swal({ title:"恭喜", text:"添加成功", type:"success" });1. 带有 确定和取消的 弹框Swal.fire({ type: 'warning', // 弹框类型 title: '注销帐号', //标题 text: "注销后将无法恢复,请谨慎操作!", //显示内容 confirmB...原创 2021-01-28 14:16:37 · 3172 阅读 · 0 评论 -
Bootstrap 下拉菜单(Dropdown)插件
<!DOCTYPE html><html><head> <meta charset="utf-8"> <title>Bootstrap 实例 - 默认的导航栏</title> <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css"> <script src=转载 2021-01-09 11:40:43 · 322 阅读 · 0 评论 -
Bootstrap 附加导航(Affix)插件
$(’#myAffix’).affix({offset: {top: 100, bottom: function () {return (this.bottom =$(’.bs-footer’).outerHeight(true))}}})<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Bootstrap 附加导航(Affix)插件</title>转载 2021-01-09 11:33:02 · 259 阅读 · 0 评论 -
Bootstrap 标签页(Tab)插件
<head> <meta charset="utf-8"> <title>Bootstrap 实例 - 标签页(Tab)插件</title> <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://cdn.staticfile.org/jqu原创 2021-01-09 10:57:33 · 221 阅读 · 0 评论 -
一个模态窗口实例
例一:<h2>创建模态框(Modal)</h2><!-- 按钮触发模态框 --><button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">开始演示模态框</button><!-- 模态框(Modal) --><div class="modal fade" id="myModal" tabindex="-1" role原创 2021-01-08 15:24:37 · 148 阅读 · 1 评论 -
PHP实现页面重定向方法
方法一: header头部重定向<?php$url = "http://php.cn";if (isset($url)) { header("Location:$url");} else { echo "没有跳转的地址!";}方法二:js脚本重定向<?php$url = "http://php.cn";if (isset($url)) {echo "<SCRIPT language= 'JavaScript'>location.href='$url'<原创 2020-12-31 15:06:29 · 654 阅读 · 0 评论 -
input按钮中的onclick事件
<INPUT onclick=document.all.WebBrowser.ExecWB(1,1) type=button value=打开 name=Button1> <INPUT onclick=document.all.WebBrowser.ExecWB(4,1) type=button value=另存为 name=Button2> <INPUT onclick=document.all.WebBrowser.ExecWB(10,1) type=button原创 2020-12-31 14:48:15 · 3074 阅读 · 0 评论 -
PHP导出Excel方法大全
导出EXCEL方法一#xmlns即是xml的命名空间$str = "<html xmlns:o=\"urn:schemas-microsoft-com:office:office\"\r\nxmlns:x=\"urn:schemas-microsoft-com:office:excel\"\r\nxmlns=\"http://www.w3.org/TR/REC-html40\">\r\n<head>\r\n<meta http-equiv=Content-Type con原创 2020-08-26 10:39:38 · 416 阅读 · 0 评论 -
PHP导出成PDF文件(输出或下载)
public function exportOrPreviewPDF(Request $request) { // 或者是导出还是预览,1预览2导出 $type = $request->type; $id = $request->id; $data = TmpFeed::where('id',$request->id)->with(['feed_list','quarter_one'])->first();原创 2020-08-26 10:17:04 · 2538 阅读 · 0 评论 -
混淆矩阵-- 笛卡尔坐标系上的热力图
app.title = '笛卡尔坐标系上的热力图';var hours = ['12a', '1a', '2a', '3a', '4a', '5a', '6a', '7a', '8a', '9a','10a','11a', '12p', '1p', '2p', '3p', '4p', '5p', '6p', '7p', '8p', '9p', '10p', '11p'];var days = ['Saturday', 'Friday', 'Thursd.原创 2020-08-03 14:21:09 · 2557 阅读 · 0 评论 -
HTML中id、name、class 区别
HTML 中 id与name 区别一个name可以同时对应多个控件,比如checkbox和radio而id必须是全文档中唯一的id的用途1) id是HTML元素的Identity,主要是在客户端脚本里用。2) label与form控件的关联,如<label for="MyInput">My Input</label><input id="MyInput" type="text">for属性指定与label关联的元素的id,不可用name替代3)脚本原创 2020-05-26 16:13:00 · 812 阅读 · 0 评论 -
bootstrap标签 label 六大类型(default,primary,success,info,warning,danger)
标签 label 【六大类型:default;primary;success;info;warning;danger;】<span class="label label-default">默认标签</span><span class="label label-primary">主要标签</span><span class="label label-success">成功标签</span><span class="labe原创 2020-05-26 15:49:20 · 9880 阅读 · 0 评论 -
PHP 根据身份证号码,获取性别、获取生日、计算年龄、获取地址、获取生肖、获取星座、以及判断是否是身份证号
1、PHP根据身份证号码,获取性别。2、PHP根据身份证号码,获取生日。3、PHP根据身份证号码,计算年龄。4、PHP根据身份证号码,获取地址。5、PHP判断字符串,是不是身份证号码。6、PHP根据身份证号码,获取生肖。7、PHP根据身份证号码,获取星座。<?php /** * 根据身份证号码获取性别 * author:xiaochuan * @param st...转载 2020-02-21 16:07:47 · 710 阅读 · 1 评论 -
HTML 表单和验证事件
HTML 表单和验证事件1、表单验证(1).非空验证(去空格)(2).对比验证(跟一个值对比)(3).范围验证(根据一个范围进行判断)(4).固定格式验证:电话号码,身份证号,邮箱,信用卡号等的验证;需要用到正则表达式来进行验证。(5).其它验证2、正则表达式用符号来描述书写规则:/ 中间写正则表达式 /^ :匹配开头,:匹配结尾;/ve/以ve开头的/ve:匹配结尾 ; /^v...原创 2020-02-21 15:22:15 · 628 阅读 · 0 评论 -
点击展开,再次点击折叠。
<!DOCTYPE html><html><head> <meta charset="utf-8"> <title>Bootstrap 实例 - 折叠(Collapse)插件方法</title> <link rel="stylesheet" href="https://cdn.staticfile.org/...原创 2020-02-19 14:29:46 · 3241 阅读 · 0 评论 -
统计组合图:实例三
index.blade.php<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>地图界面</title> <link rel="stylesheet" href="./eslydsj/js/bstable...原创 2020-02-19 10:45:06 · 204 阅读 · 0 评论