+ add js::resetForm() method for js::error() and js::alert().

This commit is contained in:
wangchunsheng
2011-07-01 01:53:46 +00:00
parent 6b0842d9d9
commit d772c652bd

View File

@@ -400,7 +400,7 @@ class js
*/
static public function alert($message = '')
{
return self::start() . "alert('" . $message . "')" . self::end();
return self::start() . "alert('" . $message . "')" . self::end() . self::resetForm();
}
/**
@@ -425,7 +425,19 @@ class js
{
$alertMessage = $message;
}
return self::alert($alertMessage);
return self::alert($alertMessage) .self::resetForm();
}
/**
* Reset the submit form.
*
* @static
* @access public
* @return string
*/
static public function resetForm()
{
return self::start() . 'if(window.parent) window.parent.document.body.click();' . self::end();
}
/**