按时间显示提示语
<script Language="Javascript"> var text=""; day = new Date( ); time = day.getHours( ); if (( time>=0) && (time < 7 )) text="夜猫子,要注意身体哦!" if (( time >= 7 ) && (time < 12)) text="早上好啊,今天心情不错吧!" if (( time >= 12) && (time < 14)) text="午休时间,要保持睡眠哦!" if (( time >=14) && (time < 18)) text="祝您下午工作愉快!" if ((time >= 18) && (time <= 22)) text="您又来了,可别忘了多回帖哦!" if ((time >= 22) && (time < 24)) text="朋友,您应该休息了!" document.write(text) </script>
在Google地图上标记地点
完整教程请参考:http://stiern.com/tutorials/adding-custom-google-maps-to-your-website
有几个疑问:
1、作者在第一段提到的Google Maps API仅仅用于获取经纬度,可以不必这么复杂。
2、在Customizing the Markers段中,代码中的companyLogo应该替换为companyImage才对。这大概是作者不小心导致的。
下载作者是提供的sample files。
more »
dbanotes.net:Web前端优化最佳实践之内容篇
网址: http://www.dbanotes.net/web/best_practices_for_speeding_up_your_web_site_content.html
Yahoo! 的 Exceptional Performance team 在 Web 前端方面作出了卓越的贡献。广为人知的优化规则也由 13 条到 14 条,再到 20 条,乃至现在的 34 条–真是与时俱进啊。最新的 34 条也针对不同的角度做了分类。
47 Javascript plugins
Javascript in Modern Web Design
Image Zoom and Popup
Lightbox
You’re probably very familiar with Lightbox — a light Javascript used to display overlay images on the current page. The original Lightbox
was released in 2005. Since then, there are many scripts released with
similar features using different approaches and Javascript libraries.
jQuery lightBox Plugin
This is exactly the same as Lightbox JS, but written on top of jQuery library.
Thickbox
Thickbox is a jQuery plugin that is very similar to Lightbox, but
comes with more features. It allows you to display: single image,
multiple images, inline content, iframed content, or content served
through AJAX in a hybrid modal.
Note: Web Designer Wall uses Thickbox to display the gallery images and tutorial demos.
山起山落
新设会