随笔分类 -  JavaScript

摘要:javascript清空file域: var file = $("#MyFile") ; file.after(file.clone().val("")); file.remove(); 阅读全文
posted @ 2020-09-28 17:15 void9main 阅读(914) 评论(0) 推荐(0)
摘要:<?php echo 0.01*94 - 0.94; 1.1102230246251565e-16 这是由于浮点型后续小数点中的0导致的 正确的做法是 <?php echo round(0.01*94,2) - round(0.94,2); 阅读全文
posted @ 2018-07-31 18:11 void9main 阅读(250) 评论(0) 推荐(0)
摘要:一、JQuery 如果是用JQuery的话,可以用inArray()函数: jquery inarray()函数详解jquery.inarray(value,array)确定第一个参数在数组中的位置(如果没有找到则返回 -1 )。determine the index of the first pa 阅读全文
posted @ 2018-07-26 11:24 void9main 阅读(403) 评论(0) 推荐(0)
摘要:16777215 ^ 2463272603异或运算 在windows下 node.js -1842515612 php -1842515612 在linux/Mac下 node.js -1842515612 php 2452451684 猜测可能是由于不同服务器下,二进制编码方式不同,具体原因不明, 阅读全文
posted @ 2018-07-24 22:30 void9main 阅读(227) 评论(0) 推荐(0)