我有一个带2个按钮的表格.一个按钮以ajax格式提交表单,另一个按钮以正常方式提交表单.
$('#form_createAd').bootstrapValidator({
submitHandler: function(validator, form, submitButton) {
if (submitButton.attr('value') == "cart"){
submit_cartDetails(); //This function submits details thru ajax post
} else {
form.submit(); // Also Tried $('#form_createAd').submit()
}
}, fields: {
title: {
message: 'The username is not valid',
validators: {
notEmpty: {
message: 'The username is required and can\'t be empty'
},
stringLength: {
min: 6,
max: 30,
message: 'The username must be more than 6 and less than 30 characters long'
},
regexp: {
regexp: /^[a-zA-Z0-9_\.]+$/,
message: 'The …Run Code Online (Sandbox Code Playgroud) 我正在尝试在codeigniter框架中设计登录/注销页面.我的问题是,当我退出网页时,我被重定向到登录页面.当我回去时,我得到一个页面,上面写着:
文件已过期
Run Code Online (Sandbox Code Playgroud)This document is no longer available.
但是,当我刷新此页面时,我再次登录系统(oO)
以下代码包含我的构造函数和注销功能.请帮我设计一个完美的登录注销页面
function __construct()
{
parent::__construct();
$this->load->model('user_model');
$this->output->set_header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . ' GMT');
$this->output->set_header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
$this->output->set_header('Pragma: no-cache');
$this->output->set_header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
}
function logout()
{
$newdata = array(
'user_name' =>'',
'user_email' => '',
'logged_in' => FALSE,
);
$this->session->unset_userdata($newdata);
$this->session->sess_destroy();
redirect('default_controller','refresh');
}
Run Code Online (Sandbox Code Playgroud)
我尝试找到适当的注销方法,但我无法做到.
大家好,我是jquery的新手.我面临着更改函数I jquery的问题
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
$("input").change(function(){
alert("The text has been changed.");
});
</script>
</head>
<body>
<input type="text">
<p>Write something in the input field, and then press enter or click outside the field.</p>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
当我在文本框外面按下它时,我没有收到警报框.请帮我解决这个问题:D