December 23, 2010 by SLJ | Category:HTML/CSS, Javascript | 2,878
转载一篇,这个有的时候还是很有用的,所以收藏一下
1、判断select选项中 是否存在Value=”paraValue”的Item
2、向select选项中 加入一个Item
3、从select选项中 删除一个Item
4、删除select中选中的项
5、修改select选项中 value=”paraValue”的text为”paraText”
6、设置select中text=”paraText”的第一个Item为选中
7、设置select中value=”paraValue”的Item为选中
8、得到select的当前选中项的value
9、得到select的当前选中项的text
10、得到select的当前选中项的Index
11、清空select的项
More »
March 15, 2010 by SLJ | Category:HTML/CSS, Javascript | 3,941
45 Fresh Useful JavaScript and jQuery Techniques and Tools
Yes, this is another round-up of fresh and useful Javascript techniques, tools and resources. But don’t close the tab yet, as you might find this one very useful. In this selection we present calendars, forms, buttons, navigation, debugging, optimization and compatibility tables as well as handy resources and tools. We also cover various jQuery-plugins that will help you extend the functionality of your website and improve user experience with ready components or coding solutions.
The last section also covers a number of useful educational resources such as a compilation of useful JavaScript coding practices, a detailed comparison of JavaScript frameworks and general JavaScript programming conventions. We are looking forward to your feedback.
More »
March 7, 2010 by SLJ | Category:HTML/CSS, iPhone/Android, Javascript | 2,782

出版商: Oreilly | ISBN: 0596805780 | 2010年1月 | PDF | 192页 | 2.8 Mb
It’s a fact: if you know HTML, CSS, and JavaScript, you already have the tools you need to develop your own iPhone apps. With this book, you’ll learn how to use these open source web technologies to design and build apps for the iPhone and iPod Touch on the platform of your choice-without using Objective-C or Cocoa.
More »
January 27, 2010 by SLJ | Category:HTML/CSS, Javascript | 604
网页可见区域宽:document.body.clientWidth
网页可见区域高:document.body.clientHeight
网页可见区域宽:document.body.offsetWidth (包括边线的宽)
网页可见区域高:document.body.offsetHeight (包括边线的宽)
网页正文全文宽:document.body.scrollWidth
网页正文全文高:document.body.scrollHeight
网页被卷去的高:document.body.scrollTop
网页被卷去的左:document.body.scrollLeft
网页正文部分上:window.screenTop
网页正文部分左:window.screenLeft
屏幕分辨率的高:window.screen.height
屏幕分辨率的宽:window.screen.width
屏幕可用工作区高度:window.screen.availHeight
屏幕可用工作区宽度:window.screen.availWidth
More »
July 15, 2009 by SLJ | Category:Javascript | 2,033

图像倒影效果
More »
April 10, 2009 by SLJ | Category:Javascript | 1,736
首先说说MD5:
MD5用的是哈希函数,在计算机网络中应用较多的不可逆加密算法有RSA公司发明的MD5算法和由美国国家技术标准研究所建议的安全散列算法SHA.
虽说已经被破解(见百度百科),但仍然是我们的加密首选。
说说用JS MD5加密的优点:
由于表单(form)在提交的时候,无论是通过GET方法还是通过POST方法,密码在提交时都会以明码的方式进行发送,很不安全。如果不是在SSL下传输的数据比较容易被分析出表单提交的密码。
优点:
1、如上所述,增加了安全性,
2、用JavaScript在客户端来加密可以减少服务器端的运算。
这是MD5的js加密代码的DEMO。其中也有MD4和SHA1的JS加密代码。原页面也又包含JS的用法
代码:
More »
April 9, 2009 by SLJ | Category:Javascript | 2,948
April 1, 2009 by SLJ | Category:Javascript | 2,836
[singlepic id=5 w=320 h=240 mode=web20 float=center]
一个利用jQuery实现菜单跟随页面滚动而移动的代码。对于一些站点的设计,可以采用这类办法。
查看DEMO
by SLJ | Category:HTML/CSS | 2,144
[singlepic id=4 w=320 h=240 float=]
下载(从raincss转载)
http://code.google.com/p/jquery-api-zh-cn/downloads/list
[singlepic id=3 w=320 h=240 float=]
安装方法,用Adobe Extension Manager CS4引入
March 24, 2009 by SLJ | Category:Javascript | 2,752
Galleriffic:A jQuery plugin for rendering fast-performing photo galleries
今天又见到一款jQuery插件,做动态相册调用的,虽然自我感觉不是很好,但如果当年做PlanetCoachella项目的时候在Business Photos里做上这个效果起码会比我那个时候自己写的一个简易AJAX图像调用来的更美观。
废话不说,看看官网DEMO:http://www.twospy.com/galleriffic/index.html
Recent Replies / 最新回复