随笔分类 -  JS、JQuery

记录,便于查阅。
摘要:$.trim() 函数用于去除字符串两端的空白字符。例如: $.trim(firstName) 阅读全文
posted @ 2020-12-10 19:14 我和我的小生活 阅读(177) 评论(0) 推荐(0)
摘要:<input type="checkbox" name="checkboxMain" onclick="CheckAll(this);" />function CheckAll(obj) { //获取checked属性 if ($(obj).prop("checked")) { //设置checke 阅读全文
posted @ 2020-12-10 18:55 我和我的小生活 阅读(2006) 评论(0) 推荐(0)
摘要:toFixed()方法可把number四舍五入为指定小数位数的数字 例子: var n=parseFloat(input).toFixed(2); 阅读全文
posted @ 2020-12-10 18:53 我和我的小生活 阅读(475) 评论(0) 推荐(0)
摘要:if(xx==undefined||xx==null||xx==''){ } 阅读全文
posted @ 2020-12-10 18:52 我和我的小生活 阅读(167) 评论(0) 推荐(0)
摘要:var d = new Date();var n = d.getTime(); 阅读全文
posted @ 2020-12-10 18:44 我和我的小生活 阅读(562) 评论(0) 推荐(0)
摘要:eval() 函数可计算某个字符串,并执行其中的的 JavaScript 代码。string 必需。要计算的字符串,其中含有要计算的 JavaScript 表达式或要执行的语句。 例子: function searchBudgetTable(){var filterString = "item => 阅读全文
posted @ 2020-12-10 18:42 我和我的小生活 阅读(310) 评论(0) 推荐(0)
摘要:function myFunction() {var str = "word";var n = str.includes("o");document.getElementById("demo").innerHTML = n;}输出结果 true if (entityid != "") { filte 阅读全文
posted @ 2020-12-10 18:40 我和我的小生活 阅读(1477) 评论(0) 推荐(2)
摘要:移除所有 <p> 的 "intro" 类: $("button").click(function(){ $("p:first").removeClass("intro"); }); removeClass() 方法从被选元素移除一个或多个类。 注释:如果没有规定参数,则该方法将从被选元素中删除所有类 阅读全文
posted @ 2020-12-10 18:39 我和我的小生活 阅读(391) 评论(0) 推荐(0)
摘要:使用 push() 方法可以给数组末尾添加一个或多个数组项。 var arr = []; arr.push('a','b'); console.log(arr); // ['a','b'] 阅读全文
posted @ 2020-12-10 18:37 我和我的小生活 阅读(2773) 评论(0) 推荐(0)
摘要:$('#transparency').hover(function () { $('.transparency').fadeIn('slow'); }, function () { $('.transparency').fadeOut('slow'); }); 阅读全文
posted @ 2020-12-10 18:36 我和我的小生活 阅读(249) 评论(0) 推荐(0)
摘要:<!DOCTYPE html><html><head></head><body><script>var nubList = [{expressId: "00001", //快递单号IDexpressNum: "数据1"},{expressId: "00002", //快递单号IDexpressNum 阅读全文
posted @ 2020-12-10 18:30 我和我的小生活 阅读(1041) 评论(0) 推荐(0)
摘要:<input type="number" style="width:310px;height:35px;" onkeyup="clearNoNum(this)" id="adjustedAmountInput" step="500" placeholder="+500/-500"/> functio 阅读全文
posted @ 2020-12-10 18:29 我和我的小生活 阅读(761) 评论(0) 推荐(0)
摘要:swal({title: '',html:'<p style="font-weight:bold;">Please input adjusted amount</p>' +'<input type="text" style="width:310px;height:35px;" id="adjuste 阅读全文
posted @ 2020-12-10 18:27 我和我的小生活 阅读(467) 评论(0) 推荐(0)
摘要:description: ' We reflect on our actions, respect each other, ' + ' offer clear feedback and celebrate success. ' 阅读全文
posted @ 2020-12-10 18:25 我和我的小生活 阅读(237) 评论(0) 推荐(0)
摘要:布局:<div class="outerContainer"> <div class="innerContent"></div></div> 样式:.outerContainer{ width:100%; height:100%; background:#eee; display:flex; jus 阅读全文
posted @ 2020-12-10 18:23 我和我的小生活 阅读(626) 评论(0) 推荐(0)
摘要:updateSurveyList() { if (localStorage.getItem('isGobackSurveyList') 'true') { localStorage.setItem('isGobackSurveyList', 'false'); this.surveyService. 阅读全文
posted @ 2020-12-10 18:20 我和我的小生活 阅读(125) 评论(0) 推荐(0)
摘要:function searchTable() { var process = $("#processid").val().toUpperCase().trim(); var candidate = $("#candidateid").val().toUpperCase().trim(); var t 阅读全文
posted @ 2020-12-10 18:19 我和我的小生活 阅读(163) 评论(0) 推荐(0)