📄 hippo_ajax_form.php
字号:
<?php
/* hippo_ajax_form class by DavidLanz
Function
========
Class Member Function
========
*/
class hippo_ajax_form
{
var $err_str;
var $urlLoginDB;
var $targetDiv;
var $idForm;
/* Constructor */
function hippo_ajax_form($idForm, $urlLoginDB, $targetDiv)
{
$this->idForm = $idForm;
$this->urlLoginDB = $urlLoginDB;
$this->targetDiv = $targetDiv;
$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_email_input_text($idField, $urlProcess)
{
$targetDiv = 'divID'.$idField;
echo '<td><input id='.$idField.' name='.$idField.' type=text onkeyup=checkEmailInput(event,' . '\'' . $targetDiv . '\',' . '\'' . $urlProcess . '\',' . '\'' . $this->idForm . '\'' . ')></td>';
echo '<td><div id='.$targetDiv.'></div></td>';
echo '<script language=JavaScript>intNumFormElement++;</script>';
}
function add_chineseid_input_text($idField, $urlProcess)
{
$targetDiv = 'divID'.$idField;
echo '<td><input id='.$idField.' name='.$idField.' type=text onkeyup=checkChineseIDInput(event,' . '\'' . $targetDiv . '\',' . '\'' . $urlProcess . '\',' . '\'' . $this->idForm . '\'' . ')></td>';
echo '<td><div id='.$targetDiv.'></div></td>';
echo '<script language=JavaScript>intNumFormElement++;</script>';
}
function form_end()
{
echo '<div id=showSubmitDiv>';
echo '<input name=form_submit id=form_submit type=button disabled=disabled onclick=sendFormData(' . '\'' . $this->idForm . '\',' . '\'' . $this->urlLoginDB . '\',' . '\'' . $this->targetDiv . '\'' . ') value=Send>';
echo '</div>';
echo '</form>';
}
function show_error()
{
return $this->err_str;
}
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -