»
Tiếng AnhTiếng PhápTiếng Việt

In - fcp Calendar - JavaScriptBank.com

Phiên bản đầy đủ: jsB@nk » Thời gian » Mờ và chớp sáng » fcp Calendar
URL: https://www.javascriptbank.com/fcp-calendar.html

fcp Calendar © JavaScriptBank.comMột đoạn mã JavaScript đơn giản khác để tạo một tờ lịch tháng trên trang web. Hiệu ứng sử dụng DOM (Document Object Model) và OOP (Object-Oriented Programming) để tạo lịch; cùng với việc trang trí bằng CSS.

Phiên bản đầy đủ: jsB@nk » Thời gian » Mờ và chớp sáng » fcp Calendar
URL: https://www.javascriptbank.com/fcp-calendar.html



JavaScript
<script language="javascript">/*Contact: info AT jswitch DOT comWebsite: http://www.jswitch.comVersion: 1.0 03/2007Browser Target: Mozilla, FireFox, Netscape 6+, IE 5.0+Type: Smooth Image ButtonsREQUEST: PLEASE ADD A LINK TO THE JSWITCH SITE.I'M NOT EVEN REQUESTING TOP PAGE LINKS, JUST A LINK SOMEWHEREDISCLAIMER:THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUTANY EXPRESS OR IMPLIED WARRANTIES, JSWITCH.COMIS NOT RESPONSIBLE FOR ANY ADVERSE AFFECTS TOYOUR COMPUTER OR SYSTEMS RUNNING THIS SCRIPT.LICENSE:YOU ARE GRANTED THE RIGHT TO USE THE SCRIPTPERSONALLY OR COMMERCIALLY. THE AUTHOR, WEBSITE LINKSAND LICENSE INFORMATION IN THE HEADER OF THIS SCRIPTMUST NOT BE MODIFIED OR REMOVED. IF PORTIONS OF THECODE ARE TRANSFERED TO ANOTHER SCRIT THE AUTHORS NAMEAND CONTACT INFORMATION MUST BE STATED IN THE NEW SCRIPTBY THE PORTIONS CODE THAT HAVE BEEN TRANSFERED.Requirements:The DIV width properties MUST be set inline (within the DIV tag not the CSS file).The button DIV elements MUST have both name and ID = "jsimgbutton"****************************************************************************************/function init() {  var jsImgButton;  jsImgButton = document.getElementsByName("jsimgbutton");  for(var i=0; i < jsImgButton.length; i++) {    jsImgButton[i].onmouseover = jsImgButton[i].onmouseup = jsImgButton[i].onmouseout = jsImgButton[i].onmousedown = ButtonState;  }}function ButtonState(evt) {  if( !evt)    evt = event;  else    evt.srcElement = evt.target;  var btnWidth = parseInt(evt.srcElement.style.width);  if(evt.type == "mouseover" )    evt.srcElement.style.backgroundPosition = "-" + btnWidth+ "px 0px";  if(evt.type == "mouseout" )    evt.srcElement.style.backgroundPosition = "0px 0px";  if(evt.type == "mousedown" )    evt.srcElement.style.backgroundPosition = "-" + btnWidth * 2 + "px 0px";  if(evt.type == "mouseup" )    evt.srcElement.style.backgroundPosition = "-" + btnWidth+ "px 0px";}// Multiple onload function created by: Simon Willison// http://simon.incutio.com/archive/2004/05/26/addLoadEventfunction addLoadEvent(func) {  var oldonload = window.onload;  if (typeof window.onload != 'function') {    window.onload = func;  } else {    window.onload = function() {      if (oldonload) {        oldonload();      }      func();    }  }}addLoadEvent(function() {  init();});</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<p> Four different colors of test buttons.?<div name="jsimgbutton" id="jsimgbutton" style=" width:100px; height:25px;background:url(red.png) no-repeat 0 0;"></div><div name="jsimgbutton" id="jsimgbutton" style=" width:100px; height:25px;background:url(blue.png) no-repeat 0 0;"></div><div name="jsimgbutton" id="jsimgbutton" style=" width:100px; height:25px;background:url(green.png) no-repeat 0 0;"></div><div name="jsimgbutton" id="jsimgbutton" style=" width:100px; height:25px;background:url(yellow.png) no-repeat 0 0;"></div><p>Did you say toolbar?</p><div style="width:175px;height:35px;"><div name="jsimgbutton" id="jsimgbutton" style="float:left;;width:35px; height:35px;background:url(ttest.png) no-repeat 0 0;"></div><div name="jsimgbutton" id="jsimgbutton" style="float:left; width:35px; height:35px;background:url(ttest.png) no-repeat 0 0;"></div><div name="jsimgbutton" id="jsimgbutton" style="float:left; width:35px; height:35px;background:url(ttest.png) no-repeat 0 0;"></div><div name="jsimgbutton" id="jsimgbutton" style="float:left; width:35px; height:35px;background:url(ttest.png) no-repeat 0 0;"></div><div name="jsimgbutton" id="jsimgbutton" style="float:left; width:35px; height:35px;background:url(ttest.png) no-repeat 0 0;"></div></div><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


Files
http://javascriptbank.com/javascript/form/Smooth_Image_Buttons/Smooth_Image_Buttons_images.zip