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
Comment will be posted after it is reviewed.