![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JavaScript
虾米大王
努力学习
展开
-
javascript 网页左右框架模式动态设定宽度高度,使页面保持屏幕一页显示
<script> window.onload = function () { var availWidth = window.screen.availWidth; //屏幕可用宽度 var availHeight = window.screen.availHeight; ...原创 2021-04-15 11:50:34 · 358 阅读 · 0 评论 -
网站链接href中带搜索词,可以直接进入搜索的输入框中
<script> var value = '要搜索的词' location.href = 'https://www.baidu.com/s?wd='+value // s代表搜索,wd代表word</script>原创 2021-03-22 15:36:14 · 480 阅读 · 0 评论 -
javascript userAgent字符串判断浏览器属性的方法
xxx.js//是否winXp系统var isWinXP=navigator.userAgent.indexOf("Windows NT 5.1")>-1||navigator.userAgent.indexOf("Windows XP")>-1;//是否win7系统var isWin7=navigator.userAgent.indexOf("Windows NT 6.1")>-1||navigator.userAgent.indexOf("Windows 7")>-1原创 2021-03-22 15:12:41 · 282 阅读 · 0 评论 -
jQuery练习t329,从0到1
test.jsdocument.writeln("虾米大王,从0到1教程"+"<br>");t329.html<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../../js/jquery-3.5.1.js"></scri.原创 2021-02-18 10:44:04 · 168 阅读 · 0 评论 -
jQuery练习t328,从0到1
info.json[ { "name": "tom", "sex" : "男", "age" : 24 }, { "name" : "Jerry", "sex" : "男", "age" : 25 }, { "name": "John", "sex" : "女", "age": 23 }]t328.html<!DOCTYPE html><html lang="en">.原创 2021-02-18 10:39:16 · 196 阅读 · 0 评论 -
jQuery练习t327,从0到1
t327-1.html<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <style type="text/css"> div{ width: 50px; height: 50px; bac.原创 2021-02-18 10:38:04 · 180 阅读 · 0 评论 -
jQuery练习t326,从0到1
test.jsdocument.writeln("虾米大王,从0到1教程"+"<br>");t326.html<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../../js/jquery-3.5.1.js"></scri.原创 2021-02-18 10:36:43 · 175 阅读 · 0 评论 -
jQuery练习t325,从0到1
info.json[ { "name": "tom", "sex" : "男", "age" : 24 }, { "name" : "Jerry", "sex" : "男", "age" : 25 }, { "name": "John", "sex" : "女", "age": 23 }]t325.html<!DOCTYPE html><html lang="en">.原创 2021-02-18 10:35:18 · 168 阅读 · 0 评论 -
jQuery练习t324,从0到1
get.php<?phpheader("Content-Type:text/html;charset=utf-8");echo "<div class='item'><h4>{$_REQUEST['username']}:</h4><p>{$_REQUEST['content']}</p></div>";t324.html<!DOCTYPE html><html lang="en.原创 2021-02-18 10:33:33 · 193 阅读 · 0 评论 -
jQuery练习t323,从0到1
get.php<?phpheader("Content-Type:text/html;charset=utf-8");echo "<div class='item'><h4>{$_REQUEST['username']}:</h4><p>{$_REQUEST['content']}</p></div>";?>t323.html<!DOCTYPE html><html la.原创 2021-02-18 10:32:11 · 181 阅读 · 0 评论 -
jQuery练习t322,从0到1
getData.php<?php$name = $_POST['name'];$age = $_POST["age"];echo "<p>姓名: $name <br> 年龄: $age </p>";?>t322.html<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title原创 2021-02-18 10:30:46 · 191 阅读 · 0 评论 -
jQuery练习t321,从0到1
getData.php<?php$name = $_POST['name'];$age = $_POST['age'];echo "<p>姓名: $name <br> 年龄: $age </p>";?>t321.html<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <titl.原创 2021-02-18 10:29:21 · 189 阅读 · 0 评论 -
jQuery练习t320,从0到1
test.php<?php$sum = 0;for ($i=1;$i<=100;$i++){ $sum += $i;}echo "1+2+......+100=".$sum;?>t320.html<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title>原创 2021-02-16 11:18:42 · 187 阅读 · 0 评论 -
jQuery练习t319,从0到1
content.html<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title></head><body> <div> 学习编程技术是一种枯燥乏味的体验,只有你对它产生兴趣,在兴趣的陪伴下,学习代码才会变得生动有趣。 </div&原创 2021-02-16 11:17:24 · 175 阅读 · 0 评论 -
jQuery练习t318,从0到1
welcome.txt欢迎学习jQuery编程技术t318.html<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../../js/jquery-3.5.1.js"></script> <script> .原创 2021-02-16 11:16:04 · 198 阅读 · 0 评论 -
jQuery练习t317,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> //jQuery插件 //函数类插件 (fu.原创 2021-02-16 11:14:21 · 206 阅读 · 0 评论 -
jQuery练习t316,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> //jQuery插件 //定义插件 进一步优化,参数有默认值.原创 2021-02-16 11:13:38 · 178 阅读 · 0 评论 -
jQuery练习t315,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> //jQuery插件 //定义插件 优化传参为多参数 .原创 2021-02-16 11:12:57 · 167 阅读 · 0 评论 -
jQuery练习t314,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> //jQuery插件 //定义插件 单参数 .原创 2021-02-16 11:12:16 · 184 阅读 · 0 评论 -
jQuery练习t313,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> /* 习题 1.在jQuery中,可以使用.原创 2021-02-16 11:11:37 · 314 阅读 · 0 评论 -
jQuery练习t312,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> (function ($) { $.extend({.原创 2021-02-16 11:10:46 · 180 阅读 · 0 评论 -
jQuery练习t311,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> $(function () { var oDiv =.原创 2021-02-16 11:10:07 · 164 阅读 · 0 评论 -
jQuery练习t310,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> //检测操作 //$.isPlainObject() 检测变.原创 2021-02-14 18:44:50 · 174 阅读 · 0 评论 -
jQuery练习t309,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> //检测操作 //$.isEmptyObject() 检测变.原创 2021-02-14 18:44:09 · 185 阅读 · 0 评论 -
jQueryt308,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script> //检测操作 //原生JavaScript判断是否为数组 function iaArr(o) { return Object.prototype.原创 2021-02-14 18:43:32 · 263 阅读 · 0 评论 -
jQuery练习t307,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> //检测操作 //$.isArray() 判断是否为数组 .原创 2021-02-14 18:42:50 · 158 阅读 · 0 评论 -
jQuery练习t306,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> //检测操作 //$.isFunction(fn) 判断是否.原创 2021-02-14 18:42:05 · 170 阅读 · 0 评论 -
jQuery练习t305,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> $(function () { var person.原创 2021-02-14 18:40:57 · 170 阅读 · 0 评论 -
jQuery练习t304,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> $(function () { var person .原创 2021-02-14 18:40:16 · 225 阅读 · 0 评论 -
jQuery练习t301,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> //数组操作 //$.each(array,function.原创 2021-02-14 18:39:15 · 184 阅读 · 0 评论 -
jQuery练习t302,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> //数组操作 //$.each(array,function.原创 2021-02-14 18:38:35 · 191 阅读 · 0 评论 -
jQuery练习t301,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> //数组操作 //$j.grep() $(f.原创 2021-02-14 18:37:54 · 260 阅读 · 0 评论 -
jQuery练习t300,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> //数组操作 //$.grep(array,function.原创 2021-02-11 10:50:03 · 183 阅读 · 1 评论 -
jQuery练习t299,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> //数组操作 //$.makeArray(obj) 转换数组.原创 2021-02-11 10:49:21 · 181 阅读 · 1 评论 -
jQuery练习t298,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> //数组操作 //$.makeArray(obj) 转换数组.原创 2021-02-11 10:48:40 · 190 阅读 · 1 评论 -
jQuery练习t297,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> //数组操作, //$.merge(arr1,arr2) 合.原创 2021-02-11 10:48:02 · 152 阅读 · 0 评论 -
jQuery练习t296,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> //数组操作 //.inArray(value,array).原创 2021-02-11 10:47:20 · 179 阅读 · 0 评论 -
jQuery练习t295,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> //URL操作 //$.param() 将数组或对象进行字符.原创 2021-02-11 10:46:09 · 178 阅读 · 0 评论 -
jQuery练习t294,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> //字符串操作 //$.trim() $(f.原创 2021-02-11 10:45:32 · 166 阅读 · 1 评论 -
jQuery练习t293,从0到1
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script src="../js/jquery-3.5.1.js"></script> <script> //查找所有兄弟元素 //.siblings(selecto.原创 2021-02-11 10:44:53 · 221 阅读 · 0 评论