随笔分类 -  JS、JS_Jquery

1
jS操作
该文被密码保护。
posted @ 2024-09-02 17:16 丁焕轩 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2024-06-27 09:34 丁焕轩 阅读(0) 评论(0) 推荐(0) 编辑
摘要:一、调出打印页面直接打印 //toolbar=no,location=no,directories=no,status=no 这些特征将分别隐藏工具栏、地址栏、目录按钮和状态栏。 window.open(routeData.href, 'newWindow', 'toolbar=no,locatio 阅读全文
posted @ 2024-04-25 15:22 丁焕轩 阅读(8) 评论(0) 推荐(0) 编辑
摘要:<html> <head> <title>按钮点击事件示例</title> <script> function a(callback) { console.log("执行函数a!"); console.log("调用回调函数"); callback(); // 调用回调函数 } function b 阅读全文
posted @ 2024-03-28 13:25 丁焕轩 阅读(13) 评论(0) 推荐(0) 编辑
摘要:一、 JSON.parse 妙用 用如下语句打印: console.info(result); console.info(result.data); console.info(JSON.parse(result.data)); console.info(JSON.parse(result.data) 阅读全文
posted @ 2024-03-08 18:09 丁焕轩 阅读(57) 评论(0) 推荐(0) 编辑
摘要:/** * 身份证15位编码规则:dddddd yymmdd xx p * dddddd:地区码 * yymmdd: 出生年月日 * xx: 顺序类编码,无法确定 * p: 性别,奇数为男,偶数为女 * <p /> * 身份证18位编码规则:dddddd yyyymmdd xxx y * ddddd 阅读全文
posted @ 2023-12-22 14:02 丁焕轩 阅读(5) 评论(0) 推荐(0) 编辑
摘要:一、【百度官网】https://lbsyun.baidu.com/ 开发文档:https://lbsyun.baidu.com/index.php?title=jspopularGL 二、百度地图使用例子 <html> <head> <meta http-equiv="Content-Type" c 阅读全文
posted @ 2023-04-06 17:43 丁焕轩 阅读(132) 评论(0) 推荐(0) 编辑
摘要:function htmlEncode(value){ if (value) { return jQuery('').text(value).html(); } else { return ''; } } function htmlDecode(value) { if (value) { return $('')... 阅读全文
posted @ 2018-09-27 10:27 丁焕轩 阅读(186) 评论(0) 推荐(0) 编辑
摘要:function CheckString(elId, spanId) { var str = document.getElementById(elId).value; var wck = document.getElementById(spanId); var ModelValue = docume 阅读全文
posted @ 2017-02-11 16:04 丁焕轩 阅读(2319) 评论(0) 推荐(0) 编辑
摘要:注意:对面页面要增加jquery引用。操作数值框,转大写,且转成带千位符的格式,labID为对应数值框后面的那个label的ID*/function NoToChinese(MyControl, labId) { //加千位符 var stmp = ""; if (MyContro... 阅读全文
posted @ 2015-10-09 15:29 丁焕轩 阅读(532) 评论(0) 推荐(0) 编辑
摘要:验证含千位分隔符的数值:/^(\d{1,3}(,\d\d\d)*(\.\d+)?|\d+(\.\d+)?)$/.test(num) 阅读全文
posted @ 2015-10-09 09:49 丁焕轩 阅读(173) 评论(0) 推荐(0) 编辑
摘要:function SetValue() { var strCodeName = $("#MainContent_ddlFullNameAndFullName").val(); if (strCodeName != "" && strCodeName.sp... 阅读全文
posted @ 2015-06-26 15:54 丁焕轩 阅读(257) 评论(0) 推荐(0) 编辑
摘要:iframe刷新父页面parent.location.reload();iframe 一个子页面操作过后,刷新指定子页面parent.frames('ifrmname').location.reload() 阅读全文
posted @ 2014-09-26 10:34 丁焕轩 阅读(135) 评论(0) 推荐(0) 编辑
摘要:是否显示 ' checked='' /> 是否可用 ... 阅读全文
posted @ 2013-10-14 10:15 丁焕轩 阅读(707) 评论(0) 推荐(0) 编辑
摘要:window.onbeforeunload = function() { if(document.body.offsetWidth-50 document.body.clientWidth && event.clientY<0 ||event.altKey) { Close(); } } 阅读全文
posted @ 2013-08-22 17:03 丁焕轩 阅读(229) 评论(0) 推荐(0) 编辑
摘要:index.asp代码 scrolling="auto" frameborder="NO" border="0" framespacing="0"> frame Right 中某个页面要访问其他frame的控件: va... 阅读全文
posted @ 2013-08-21 15:25 丁焕轩 阅读(382) 评论(0) 推荐(0) 编辑
摘要:function funClear() { var txts = document.getElementsByTagName("input"); for (var i = 0; i < txts.length; i++) { if (txts[i].type == "text"||txts[i].type == "checkbox") { txts[i].value = ""; } } } 阅读全文
posted @ 2013-03-07 15:51 丁焕轩 阅读(2468) 评论(0) 推荐(0) 编辑
摘要:document.body.offsetWidth;document.getElementById("rightlst").style.width="100px"document.getElementById("rightlst").style.height="100px" 阅读全文
posted @ 2013-03-01 15:06 丁焕轩 阅读(25760) 评论(0) 推荐(0) 编辑
摘要:禁用整个页面用document.oncontextmenu=function(){return false;}禁用一个table用<tableoncontextmenu="returnfalse;"></table> 阅读全文
posted @ 2013-02-27 14:23 丁焕轩 阅读(138) 评论(0) 推荐(0) 编辑
摘要:在javascript中验证日期的方法方法一:function checkDate(str) { var pattern = /^((\d{4})|(\d{2}))-(\d{1,2})-(\d{1,2})$/g; //校验格式,如果格式不匹配,返回 if(!pattern.test(str)) { alert("格式不匹配(YYYY-MM-DD 或 YY-MM-DD)!"); return false; } 注意:pattern.test(str)方法调用第一次为true第二次为false第三次为true……方法二/^((\d{4})|(\d{2}))[-./]... 阅读全文
posted @ 2012-02-03 10:11 丁焕轩 阅读(237) 评论(0) 推荐(0) 编辑

1
点击右上角即可分享
微信分享提示