- 1 Introduction
- 1.1 About zentaoPHP
- 1.2 Features
- 1.3 License
- 2 Installation
- 2.1 System Requirement
- 2.2 Install zentaoPHP
- 3 Quick Start
- 3.1 Echo Hello World!
- 3.2 Use MVC to echo Hello World!
- 3.3 Example: Deploy the blog built in zentaoPHP
- 4 Basics
- 4.1 Basic Concepts
- 4.2 Request Types
- 4.3 Create Links
- 4.4 Class: HTML, JS, and CSS
- 5 Advanced
- 5.1 Directory Structure
- 5.2 DAO
- 5.3 Pager Solutions
- 5.4 Data Validation
Class: HTML, JS, and CSS
- 2018-07-12 10:38:35
- tengfei
- 6421
- Last edited by tengfei on 2019-09-16 14:11:22
zentaoPHP has front.class.php with three classes built in, HTML, JS, and CSS, which are used to generate HTML tags to create a simple JS interaction.
1. html
- html::title($title) , to generate $title tag
- html::meta($name, $value) , to generate meta tag in html
- html::icon($url), to generate the code to call in icon
- html::rss($url, $title), to output rss。
- html::a($href, $title, $target, $misc),to generate a hyperlink
- html::mailto($mailto, $title) , to generate a mailto link
- html::select($name, $options, $selected, $attr),to generate tags
- html::radio($name, $options, $selected, $attr), to generate a radio button
- html::checkbox($name, $options, $selected, $attr),to generate a checkbox
- html::input($name, $value, $attr) , to generate a input box
- html::hidden($name, $value, $attr), to generate a hidden variable
- html::password($name, $value, $attr), to generate a password box
- html::textarea($name, $value, $attr), to generate a textarea
- html::file($name, $attr), to generate a file selection box
- html::submitButton($label, $attr) , to generate a submit buttion
- html::resetButton(),to generate a reset button
- html::commonButton($label, $attr), to generate a common button
- html::linkButton($label, $link, $attr),to generate a bliink button
2. js
- js::import($url, $version) , to generate a js file call, version is to distinguish versions and aoid js files at the client not refreshing
- js::alert($message),to generate an alert
- js::error($errors),an error warning, $errors can be arrays
- js::confirm($message, $okURL, $cancelURL, $okTarget, $cancelTarget),selection prompt
- js::locate($url, $target),redirecting page, target is the window that will be jumped to
- js::closeWindow(), close a window
- js::refresh($url, $target, $timeout),refresh a page
- js::reload($window), reload a window automatically
- js::exportConfigVars(),ouput the required information of running zentaoPHP in $config to js
- js::execute($code),execute js codes
3. css
- css:import($url, $version), to import a css file
- css::internal($css),to generate codes
Write a Comment