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

浙公网安备 33010602011771号