• smart code


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

    <ul id="content-share-list"  class="bdsharebuttonbox bdshare-button-style0-16">
      <li><a class="content_qq" onclick="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" onclick="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))" />
    
  • 相关阅读:
    数据库的架构和优化
    描述一个高性能高可靠的网站架构——如何设计一个秒杀系统
    PHP手册-函数参考-加密扩展
    系统性能指标总结
    PHP实现负载均衡的加权轮询
    PHP生成二维码
    高性能网站架构
    PHP实现Redis的数据结构和LFU/LRU
    缓存的设计及PHP实现LFU
    网络开发库从libuv说到epoll
  • 原文地址:https://www.cnblogs.com/shiysin/p/10551317.html
Copyright © 2020-2023  润新知