smart code

news/2024/7/3 2:28:10

 

 

一行代码将网页分享到QQ、微博等

<ul id="content-share-list"  class="bdsharebuttonbox bdshare-button-style0-16">
  <li><a class="content_qq" οnclick="window.open('http://connect.qq.com/widget/shareqq/index.html?url='+encodeURIComponent(document.location.href));return false;" title="分享到QQ">QQ好友</a></li>
  <li><a class="content_qqzone" οnclick="window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+encodeURIComponent(document.location.href));return false;">QQ空间</a></li>
  <li><a class="content_weixin" data-cmd="weixin">微信好友</a></li>
  <li><a class="content_sina" href="javascript:window.open('http://v.t.sina.com.cn/share/share.php?title='+encodeURIComponent(document.title.substring(0,76))+'&url='+encodeURIComponent(location.href)+'&rcontent=','_blank','scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes'); void 0">新浪微博</a></li>
</ul>
<!-- 点击微信好友生成的二维码 -->
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>

  

一行代码滚动显示本地天气

<iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=11" width="500" height="15" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" ></iframe>

  

input框中只能输入非负整数

<input type="text" value="3" maxlength="3" style="width : 30px;text-align: right;" onKeyUp="value=(parseInt((value=value.replace(/\D/g,''))==''?'0':value,10))" />

 

转载于:https://www.cnblogs.com/shiysin/p/10551317.html


http://www.niftyadmin.cn/n/4556261.html

相关文章

老虎的月测分析

题目描述 今年是虎年&#xff0c;小老虎一年来过得可充实了&#xff0c;一有时间就往电脑室跑&#xff0c;因为他要在“在线测试”系统上拿第一名&#xff0c;成为做题最多的牛人。可小老虎也有烦恼的时候。一天放学&#xff0c;小老虎正走出课室想去电脑室&#xff0c;班主任过…

Perl、C、sed、awk、shell scripting 谁有好点的电子书

http://www.xiaoshuojia.com.cn/  书友之家http://www.wytxt.com/  小说导航http://www.uu366.com/book/download.html  梅雨电子书下载论坛http://bbs.myt66.com/  小说下载网http://www.entyes.com/  33文学网http://www.55txt.com/  txt电子书库http://www.txtk…

C语言初级问题

单精度转双精度 直接赋值就可以了例如 float t10.0; double s; s(double)t;字符型转双精度 我的方法是先转int 再强制转换为double例如 char s5; int t; double d; ts-48;//ascll码表 d(double)t;

谁有C#实例的网站或电子书

非常不错 http://www.51aspx.com/ ||| 我下载了一些http://www.csdn.net/ ||| 博客园去百度搜 里面很多实例跟书籍 我介绍个网址给你

Maximize Sum Of Array After K Negations

1 heapq.heapify(A) 2 for i in range(K): 3 heapq.heapreplace(A, -A[0]) 4 5 return sum(A) 最近在看python&#xff0c;该题现在最快的算法 1 A.sort()2 bZero False3 ret 0;4 minNum sys.max…

怎样才能最快学会c#程序

上课有人教 做多了就明白其中的意思了&#xff09; 下课多做练习&#xff08;这个重要 从基础到一般的应用 认真听课 到的不够好..没人说其实是瓶口太小... ||| 介绍一本《C&#xff03;入门基础》看看 一定要有耐心的去看 刻苦的钻研 下课还是靠自己、 ||| 认真 刻苦 ||| 看网…

电脑编程C++是什么意思

||| C是一种编程 C是一种不完全面向对像的语言~ ||| 1.C从零开始&#xff08;一&#xff09;——何谓编程 - 编程心得 - 文档中心 - 源码...2.编程 只需要按每个编程语言各自特点变下就OK了 都差不多 学会了C其他什么JAVA的 ||| c是一种编程语言而已 程序员 ||| 我感觉学习编程…

JavaScript数组常用方法总结

参考&#xff1a;https://www.infoq.cn/article/3L*kK19KH2Ey7GIVBGsN map、filter、reduce map&#xff1a;返回一个数组&#xff0c;其中每个元素都使用指定函数进行过转换。const arr [1, 2, 3, 4, 5, 6]; const mapped arr.map(el > el 20); console.log(mapped); //…