01 2023 档案

摘要:一、字符串 1 var str = 'Hello world!'; 2 console.log( str.indexOf('e') ); // 存在字符串中,返回位置 1 3 console.log( str.indexOf('d') ); // 存在字符串中,返回位置 10 4 console.l 阅读全文
posted @ 2023-01-13 18:30 net-sky 阅读(4441) 评论(0) 推荐(0) 编辑
摘要:如题,在C#/.NET应用程序编程开发中如何判断一个集合中是否包含某个指定的素对象? 比如当前有一个对象集合(List): List<Customer> customers Customer.cs类似如下: public class Customer { public int Id{get;set; 阅读全文
posted @ 2023-01-13 18:27 net-sky 阅读(1234) 评论(0) 推荐(0) 编辑
摘要:操作元素文本内容的方法有三种:innerHTML、innerText、value (1) 第一种:innerHTML:能够解析内容中的html标签 1 <body> 2 <div id="box"> 3 hello world 4 <div>111</div> 5 <p></p> 6 </div> 阅读全文
posted @ 2023-01-10 17:53 net-sky 阅读(1014) 评论(0) 推荐(0) 编辑
摘要:setTimeout定义和用法setTimeout() 方法用于在指定的毫秒数后调用函数或计算表达式。setTimeout 方法接收两个参数,第一个参数为回调函数函数或字符串,第二个参数为触发时间(单位:毫秒) setInterval()定义和用法setInterval() 方法可按照指定的周期(以 阅读全文
posted @ 2023-01-10 17:10 net-sky 阅读(73) 评论(0) 推荐(0) 编辑
摘要:一、总结几种页面加载完成以后再执行当前js文件的方式: 1. 首先是js自带的方法 <script type="text/javascript"> window.onload = function () { //方法内容 } </script> 2. jQuery执行的演示,该方法比较繁琐,一般都是 阅读全文
posted @ 2023-01-10 16:33 net-sky 阅读(1174) 评论(0) 推荐(0) 编辑
摘要:方法一(建议): if ($("#checkbox-id").get(0).checked) { // do something } 感谢豆瓣绿补充: if ($("#checkbox-id")[0].checked) { // do something } 方法二(建议): if($('#chec 阅读全文
posted @ 2023-01-09 16:51 net-sky 阅读(553) 评论(0) 推荐(0) 编辑

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