JavaScript

Download Files

Copy Url

Contents

  1. Contents
  2. Auto Filling
  3. Structures

Auto Filling

Our index.js empowers you to seamlessly inject content into templates using specific class names.

Auto Filling Rules
Class Content Example

author

author name

current_year

current year index

current_month

current month index (starts from 0)

current_monthName

current month name

current_date

current date index

current_day

current day index

current_dayName

current dayName

current_hour

current hour index

current_minute

current minute index

current_second

current second index

Table 4.1: Auto Filling Rules

Structures

Our index.js facilitates the display of various structures alongside the original HTML grammar, each governed by distinct class names.

Select View

This allows you to show different contents based on different choices.

Paragraph 1

Paragraph 2

Paragraph 3

Refreshing

Display contents requiring frequent refreshing.

Date & Time:

Functions

Our index.js provides some useful functions to simplify the script.

Cookies

We have several functions to deal with cookies easily.

  1. setCookie Run setCookie(name, value, expirate_date) to add cookies. (expirate_date should be an integer)

  2. getCookie Run getCookie(name) to get the value of the relavant coookie, which will return null in case cookie not found.

  3. deleteCookie Run deleteCookie(name) to delete a cookie.