![](https://img-blog.csdnimg.cn/20190927151117521.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
html
文章平均质量分 59
document.body.contentEditable='true';
sandalphon4869
这个作者很懒,什么都没留下…
展开
-
H5选择本地文件夹下图片上传到服务器,并在网页中显示
文章目录基本变种html5缺点:还要选择基本<!DOCTYPE html><html lang="en"><head> <meta charset="utf-8"> <title>Definition</title> <!--[if lt IE 9]> <script src="http://cdn.static.runoob.com/libs/html5sh原创 2021-07-12 21:12:18 · 2458 阅读 · 0 评论 -
script的函数知识点
文章目录script的两种函数script与body的位置script的两种函数js代码会先进入预编译阶段,然后再进入执行阶段:预编译阶段:声明变量;处理声明式函数。执行阶段:赋值变量;处理赋值式函数;处理调用函数语句。同一阶段中按语句先后顺序执行。例子1f1(); // 调用函数语句function f1() { // 声明式函数 console.log('f1');}所以,造成了可以f1()可以写在function f1(){}前的情况。例子2原创 2021-07-12 19:40:00 · 761 阅读 · 2 评论 -
html模版语法
文章目录用在<script><script/>中:单个数据<script> var size = {{ data }}<script/>列表<body><div class="pic"></div></body><script> {% for each_src in data %} var a = '<img src="'原创 2021-02-11 18:29:37 · 2077 阅读 · 0 评论 -
jQuery之增加DOM元素
<!DOCTYPE html><html><head><script src="/jquery/jquery-1.11.1.min.js"></script><script>$(document).ready(function(){ $("#btn1").click(function(){ $("ol").append("<li>Appended item</li>"); });原创 2021-01-03 17:39:31 · 887 阅读 · 0 评论 -
在油猴中使用jQuery:eslint: no-undef - `$` is not defined“
文章目录问题:解决方案:// @require http://code.jquery.com/jquery-3.x-git.min.js/* globals jQuery, $, waitForKeyElements */例子:原创 2021-01-03 11:28:34 · 6630 阅读 · 3 评论 -
用jQuery锁定标签
文章目录一、三种锁定标签的方式1.知识点2.例子3.id的特殊性4.和Chrome的区分5. 进阶用法二、用途:1. 锁定body元素一个测试的网站:https://www.w3school.com.cn/tiy/t.asp?f=js_jquery_queryselectorall一、三种锁定标签的方式1.知识点返回的都是列表:标签名:$("");:返回匹配到的所有元素。id:$("#");:返回的列表只有一个元素,这个元素是匹配到的第一个元素。类名:$(".");:返回匹配到的所有元素。原创 2021-01-03 09:27:27 · 486 阅读 · 1 评论 -
html移动端长按弹出
在电脑端打开无效果,这是特定用于移动端的。<!DOCTYPE html><html><head> <meta charset="utf-8"/> <title></title> <script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/1.9.1/jquery-1.9.1.min.js"></script></原创 2020-12-16 19:29:39 · 545 阅读 · 0 评论 -
jQuery实现购物车计算价格功能的方法
文章目录Reference未输入时当作0<!DOCTYPE HTML><html><head> <title>cart</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- 要把jquery-1.9.1.min.js导进去,不导出不来 --> <script原创 2020-08-28 10:12:31 · 986 阅读 · 0 评论 -
html js
文章目录查找控件1.getElementsByName2.getElementById函数查找控件1.getElementsByName因为控件的属性name可以允许重名,所以document.getElementsByName()返回的是一个数组(哪怕只有一个元素),所以要document.getElementsByName("a")[0]这样索引的形式才能得到对应的控件。# 清空输入框的内容// document.getElementsByName("a").values = "";原创 2020-08-06 13:40:20 · 222 阅读 · 0 评论 -
html 表单
文章目录禁止button提交表单, 但是不禁止js提交禁止button提交表单, 但是不禁止js提交当在表单form中时,type才有意义,不然写了白写。<form method="POST" action="/post/"> <button type="button" onclick="f(this)" value="hello"></button></form>修改button的type属性:button、submit、reset。原创 2020-08-06 13:43:23 · 101 阅读 · 0 评论