前言 一个成熟的大型网站(如淘宝、京东等)的系统架构并不是开始设计就具备完整的高性能、高可用、安全等特性,它总是随着用户量的增加,业务功能的扩展 逐渐演变完善的,在这个过程中,开发模式、技术架构、设计思想也发生了很大的变化,就连技术人员也从几个人发展到一个部门甚至一条产品线。所以成熟的系统 架构是随业务扩展而完善出来的,并不是一蹴而就;不同业务特征的系统,会有各自的侧重点,例如淘宝,要解决海量的商品信息的搜索、下单、支付,例如腾讯, 要解决数亿的用户实时消息传输,百度它要处理海量的搜索请求,他们都有各自的业务特性,系统架构也有所不同。尽管如此我们也可以从这些不同的网站背景下, 找出其中共用的技术,这些技术和手段可以广泛运行在大型网站系统的架构中,下面就通过介绍大型网站系统的演化过程,来认识这些技术和手段。 一、最开始的网站架构 最初的架构,应用程序、数据库、文件都部署在一台服务器上,如图:…
April 25, 2015
jQuery: textarea 自动适应高度 无下拉条 Elastic
<!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Elastic Demo - iKeepStudying.com </title> <script type='text/javascript' src='http://sources.ikeepstudying.com/js/jquery-1.11.0.min.js'></script> <script type='text/javascript' src="http://sources.ikeepstudying.com/textarea_auto_height/jquery.elastic.source.js"></script> <style type='text/css'> textarea { padding: 10px; width: 90%; font-family: Arial, 'sans-serif' } </style> <script type='text/javascript'> $(window).load(function(){ $('#description').elastic(); }); </script> </head> <body> <textarea id="description"> This textarea is going to grow when you fill it with text. Just type a few more words in it and you will see.fadsfsdfasdThis textarea is going to grow when you fill it with text. Just type a few more words in it and you will see.fadsfsdfasdThis textarea is going to grow when you fill it with text. Just type a few more words in it and you will see.fadsfsdfasdThis textarea is going to grow when you fill it with text. Just type a few more words in it and you will see.fadsfsdfasdThis textarea is going to grow when you fill it with text. Just type a few more words in it and you will see.fadsfsdfasdThis textarea is going to grow when you fill it with text. Just type a few more words in it and you will see.fadsfsdfasdThis textarea is going to grow when you fill it with text. Just type a few more words in it and you will see.fadsfsdfasdThis textarea is going to grow when you fill it with text. Just type a few more words in it and you will see.fadsfsdfasdThis textarea is going to grow when you fill it with text. Just type a few more words in it and you will see.fadsfsdfasdThis textarea is going to grow when you fill it with text. Just type a few more words in it and you will see.fadsfsdfasdThis textarea is going to grow when you fill it with text. Just type a few more words in it and you will see.fadsfsdfasdThis textarea is going to grow when you fill it with text. Just type a few more words in it and you will see. </textarea> </body> </html>
DEMO:http://sources.ikeepstudying.com/textarea_auto_height/
官网: http://unwrongest.com/projects/elastic/
项目:https://github.com/janjarfalk/jquery.elastic.js
原文地址:jQuery: textarea 自动适应高度 无下拉条 Elastic