Java

         

a one digit minute as


// add zero digit to a one digit minute as spaceholder

if (minute < 10)

minute = "0" + minute

// do not parse this number!

// convert minute and hour values to strings

minute += ""

hour += ""

// assign image tags according to the value of hour

for (var i = 0; i < hour.length; ++i) {

text += openImage + hour.charAt(i) + closeImage

}

// assign image tag of colon separator to text variable

text += openImage + "c.gif\" HEIGHT=21 WIDTH=9>"

// assign image tags according to the value of minute

for (var i = 0; i < minute.length; ++i) {

text += openImage + minute.charAt(i) + closeImage

}

// assign am / pm image tag to text variable

text += openImage + ampm + closeImage

// return accumulative HTML string

return text}function getPath(url) {

lastSlash = url.lastIndexOf("/")

return url.substring(0, lastSlash + 1)}

// -->

</SCRIPT>

2.<SCRIPT LANGUAGE="JavaScript">

<!--

// Copyright (c) 1996-1997 Tomer Shiran. All rights reserved.

// Permission given to use the script provided that this notice remains as is.

// Additional scripts can be found at http:

//www.geocities.com/~yehuda

/// image files needed:

// *******************

// dg0.gif

// dg1.gif

// dg2.gif

// dg3.gif

// dg4.gif

// dg5.gif

// dg6.gif

// dg7.gif

// dg8.gif

// dg9.gif

// dgp.gif

// Any set of digit images (0-9), and a period

// image (.) will work with this script.

// instructions:

// *************

// Place all image files in a folder / directory.

// Add this script, including all comments, to

// the desired HTML document. The HTML file must

// be located in the same directory as the image

// files.

document.write(setDate())

function setDate() {

// initialize accumulative HTML variable to empty string

var text = ""

// set standard convention for digit and punctuation images

var openImage = "<IMG SRC=\"" + getPath(location.href) + "dg"


Содержание  Назад  Вперед







Forekc.ru
Рефераты, дипломы, курсовые, выпускные и квалификационные работы, диссертации, учебники, учебные пособия, лекции, методические пособия и рекомендации, программы и курсы обучения, публикации из профильных изданий