![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
WEB前端
八点博客(钏)
专注分享技术交流
展开
-
editor.md基本使用和图片上传
1、代码<!DOCTYPE html><html lang="zh"> <head> <meta charset="utf-8" /> <title>Simple example - Editor.md examples</title> <link rel="stylesheet" href="css/style.css" /> <link r原创 2021-10-18 11:31:08 · 1250 阅读 · 0 评论 -
vue封装公共函数
1、common.js定义两个公共函数function toast(title = '', icon = 'none') { uni.showToast({ title: title, icon: icon });}function myRequest(url = "", data = {}, method = 'POST'){ return new Promise((res,rej)=>{ uni.request({ url: this.$apiUrl + url,原创 2021-08-15 14:40:06 · 880 阅读 · 0 评论 -
filepond使用
filepond是一款上传插件。官网https://pqina.nl/filepond基本使用1、cdn引入<link href="https://unpkg.com/filepond/dist/filepond.css" rel="stylesheet"><script src="https://unpkg.com/filepond/dist/filepond.js"></script>2、html<input type="file" .原创 2021-01-07 11:26:55 · 2313 阅读 · 0 评论 -
Tinymce 配置
'language'=>'zh_CN', 'plugins'=>'print preview searchreplace autolink directionality visualchars fullscreen image link media template code table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wor...原创 2020-12-17 10:17:36 · 635 阅读 · 0 评论 -
方便SEO自动跳转手机端JS代码
1、网站<head></head>加入canonical、alternate标签<link rel="canonical" href="{{\Request::url()}}"/><link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.xxxx.com/{{\Request::path() == '/' ? '' : \Request::path()}}原创 2020-11-25 09:40:17 · 401 阅读 · 0 评论 -
uniapp 使用 colorUI
1、新建uniapp项目 test2、导入colorUI示例项目用hbuildx导入(点击跳转到示例项目)3、将示例项目中的 colorui 文件夹复制到 test 项目的根目录4、 test/App.vue 中引入 css<style> @import "./colorui/main.css"; @import "./colorui/icon.css"; @import './common/app.css'</style>完成以上步骤后,可以使用col原创 2020-08-24 11:10:13 · 1509 阅读 · 0 评论 -
easywechat微信开发系列(2):公众号网页支付
准备工作:1、已认证的服务号(apppid、appsecret、token、aes_key)2、微信支付商户(商户号、密钥)3、两者互相绑定原理解析:1、前台商品页面:点击支付按钮,js获取商品id和数量(价格和用户ID尽量在后台获取,防止用户恶意操作)2、点击按钮后ajax把商品id和数量传递给后台(后台地址为 /wxPay)3、后台根据商品id查找价格等信息,创建订单(订单价格,订单号,是否支付等信息)创建订单时是未支付状态。然后把总价×100和订单号通过easywe.原创 2020-07-21 10:06:08 · 1115 阅读 · 0 评论 -
Nodejs开发技巧集锦(4):使用multiparty获取上传的表单文件
1、安装multipartycnpm install multiparty --save2、引入var multiparty = require('multiparty');var fs = require('fs'); //文件模块3、表格一定要含有enctype="multipart/form-data"<form action="/doProductAdd...原创 2019-04-02 09:14:16 · 3000 阅读 · 0 评论 -
Nodejs开发技巧集锦(2):连接Mongodb进行CURD
准备:1、会使用nodejs:https://blog.csdn.net/sinat_37390744/article/details/888457452、会使用mongodb:https://blog.csdn.net/sinat_37390744/article/details/88822676步骤1、在项目文件夹根目录安装mongodb模块npm install mon...原创 2019-03-27 15:27:39 · 169 阅读 · 0 评论 -
iframe调用子页面按子页面的内容自动调整高度(同域)
<iframe src="子页" id="iframepage" name="iframepage" frameBorder=0 scrolling=no width="100%" onLoad="iFrameHeight()" ></iframe>js里写上<script type="text/javascript"原创 2018-07-13 13:23:04 · 795 阅读 · 0 评论 -
jQuery父级以及同级元素查找
jQuery.parent(expr) 找父亲节点,可以传入expr进行过滤,比如$("span").parent()或者$("span").parent(".class") jQuery.parents(expr),类似于jQuery.parents(expr),但是是查找所有祖先元素,不限于父元素 jQuery.children(expr).返回所有子节点,这个方法只会返回直接转载 2017-12-17 13:48:56 · 413 阅读 · 0 评论 -
35个jQuery小技巧
1. 禁止右键点击$(document).ready(function(){ $(document).bind("contextmenu",function(e){ return false; });});2. 隐藏搜索文本框文字Hide when clicked in the search field, the value.(example can b原创 2017-02-24 22:44:07 · 382 阅读 · 0 评论 -
Semantic UI 的基本使用(二):具体案例
1、网格<div class="ui grid"> <div class="four wide column">1</div> <div class="four wide column">2</div> <div class="four wide column">3</div> <div class="four wide column">4</div></div>2、标签页<div原创 2017-05-06 21:02:16 · 7277 阅读 · 0 评论 -
Web前端:原生javascript实现列表元素的点击删除
<!DOCTYPE html> <html> <head> <meta charset=" utf-8"> <meta name="author" content="http://www.softwhy.com/" /> <title>Document</title> <style type="text/css"> ul{ list-style:none; width:1原创 2017-07-06 16:03:31 · 2267 阅读 · 1 评论 -
使用clipboard.js实现页面内容复制到剪贴板
clipboard.js是一个github上的开源项目,可以实现纯 JavaScript (无 Flash)的浏览器内容复制到系统剪贴板的功能。1、访问clipboard.js项目主页——https://github.com/zenorocha/clipboard.js2、下载clipboard.min.js,并在页面中引用[html] view pla原创 2017-11-02 19:00:59 · 510 阅读 · 0 评论 -
Sweetalert使用说明
1、下载js和css文件 或者去 CDN库去引入 2、一句话调用 Click Me function abc(){ swal(“恭喜!”, “恭喜您评论发表成功 !”, “success”); }3、http://mishengqiang.com/sweetalert/原创 2017-12-10 22:11:41 · 2583 阅读 · 0 评论 -
使用ueditor进行图片上传、保存、存入数据库
话不多说,直接写方法(PHP版本的)。打开php/config.json文件 "imageActionName": "uploadimage", /* 执行上传图片的action名称 */ "imageFieldName": "upfile", /* 提交的图片表单名称 */ "imageMaxSize": 20480000, /* 上传大小限制,单位B */ "imageA原创 2017-12-12 16:54:52 · 4001 阅读 · 4 评论 -
onbeforeunload设置用户关闭离开页面时提醒用户保存信息
function CloseEvent() { var DispClose = true; /// TODO 是否出现提示,若不需要,将DispClose 设为false ////////////// if (DispClose) { return "提示:您尚有未保存的内容,离开本页将丢失编辑内容!"; }原创 2017-12-16 20:52:15 · 6359 阅读 · 0 评论 -
微信开发四之获取图书馆查询
$textTpl = " %s 8 %s 1 "; $url="http://210.47.0.5:8080/opac/search_rss.php?dept=ALL&title={$keyword}&doctype=ALL原创 2017-01-26 11:51:41 · 530 阅读 · 0 评论