• ZenTaoPHP框架里面提供的html, js和css類

    0

     

    ZenTaoPHP
    www.zentao.net的框架里面提供了一個front.class.php,里面內置了三個類,分別為html, js和css,用來生成一些html標簽,創建簡單的js交互。

    一、html類

    • html::title($title)  生成<title>$title</title>標簽。
    • html::meta($name, $value) 生成html的meta標簽。
    • html::icon($url) 生成icon文件的調用代碼。
    • html::rss($url, $title) 輸出rss。
    • html::a($href, $title, $target, $misc),生成超鏈接。
    • html::mailto($mailto, $title) 生成mailto 鏈接。
    • html::select($name, $options, $selected, $attr),生成<select>標簽。
    • html::radio($name, $options, $selected, $attr), 生成單選按鈕。
    • html::checkbox($name, $options, $selected, $attr),生成復選按鈕。
    • html::input($name, $value, $attr) 生成文本框。
    • html::hidden($name, $value, $attr)生成隱藏變量。
    • html::password($name, $value, $attr)生成密碼框。
    • html::textarea($name, $value, $attr)生成textarea
    • html::file($name, $attr)生成文件選擇框。
    • html::submitButton($label, $attr) 生成提交按鈕。
    • html::resetButton(),生成重置按鈕。
    • html::commonButton($label, $attr) 生成一個普通的按鈕。
    • html::linkButton($label, $link, $attr),生成一個帶有鏈接的按鈕。

    二、JS類

    • js::import($url, $version) 生成一個js文件的調用。version用來區分不同的版本,以避免客戶端js文件不刷新的問題。
    • js::alert($message),生成一個警告框
    • js::error($errors),錯誤警告,$errors可以是數組。
    • js::confirm($message, $okURL, $cancelURL, $okTarget, $cancelTarget),選擇提示。
    • js::locate($url, $target),跳轉頁面, target是要跳轉的窗口。
    • js::closeWindow(), 關閉窗口。
    • js::refresh($url, $target, $timeout),刷新頁面。
    • js::reload($window), 自動重載某一個窗口。
    • js::exportConfigVars(),將$config里面框架運行的必需信息輸出到js中。
    • js::execute($code),執行某一段js代碼。

    三、css類

    • css:import($url, $version), 導入某一個css文件。
    • css::internal($css),生成<style>code</style的標簽。

    相似問題

    相關經驗

    相關資訊

    相關文檔

  • sesese色