📄 hippo_ajax_form.php
字号:
<?php
/* hippo_ajax_form class by DavidLanz
Function
========
Class Member Function
========
*/
class hippo_ajax_form
{
var $err_str;
var $urlPHP;
var $targetDiv;
var $idForm;
var $intDIVCounter;
var $splitter;
/* Constructor */
function hippo_ajax_form($idForm, $urlPHP, $targetDiv)
{
$this->idForm = $idForm;
$this->urlPHP = $urlPHP;
$this->targetDiv = $targetDiv;
$this->intDIVCounter=0;
$this->splitter='_';
$this->init();
}
function init()
{
echo '<script language=JavaScript src=hippo_ajax_form.js></script>';
echo '<form id='.$this->idForm.' name='.$this->idForm.'>';
return true;
}
function add_input_text($idField, $passValue='', $ifPassword=false)
{
if($idField=='')
{
$this->err_str='Error: add_input_text() parameter error.';
return false;
}
else
{
if($ifPassword)
{
if($passValue=='')
{
echo '<input id='.$idField.' name='.$idField.' type=password >';
return true;
}
else
{
echo '<input id='.$idField.' name='.$idField.' type=hidden value='.$passValue.'>';
return true;
}
}
else
{
if($passValue=='')
{
echo '<input id='.$idField.' name='.$idField.' type=text >';
return true;
}
else
{
echo '<input id='.$idField.' name='.$idField.' type=hidden value='.$passValue.'>';
return true;
}
}
}
}
function form_end()
{
echo '<div id=showSubmitDiv>';
echo '<input name=form_submit id=form_submit type=button onclick=sendFormData(' . '\'' . $this->idForm . '\',' . '\'' . $this->urlPHP . '\',' . '\'' . $this->targetDiv . '\'' . ') value=癳
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -