我正在使用remy sharp的提示插件.
<input type="text" title="hint" name="names" class="input" />
Run Code Online (Sandbox Code Playgroud)
但是当我发布表单而不填写字段时,输入仍然有
$_POST['names'] = 'hint';
Run Code Online (Sandbox Code Playgroud)
我该如何防止这个问题?
提前致谢.
编辑:jQuery代码:
$(".input").hint();
$(".lSubmit").click(function(e){
e.preventDefault();
$.post('form.php',decodeURIComponent($("#forms").serialize()) , function(data) {
$('.result').html(data);
});
});
Run Code Online (Sandbox Code Playgroud) 有
SCRIPT5009:'$'未定义
<script type="text/javascript" src="xxx_files/jquery.js"></script>
<script type="text/javascript" src="xxx_files/jquery_002.js"></script>
<script type="text/javascript" src="xxx_files/ticker.js"></script>
<script type="text/javascript" src="xxx_files/config.js"></script>
<script type="text/javascript" src="xxx_files/ajax.js"></script>
<script type="text/javascript" src="xxx_files/lite.js"></script>
<script type="text/javascript" src="xxx_files/jquery.pagination.js"> </script>
<script type="text/javascript">
$(document).ready(function(){
$('#slide').pajinate({
num_page_links_to_display : 0,
items_per_page : 4
});
});
</script>
Run Code Online (Sandbox Code Playgroud)
在IE9中使用jQuery 1.6.1.为什么'$'在ie9中未定义?
提前致谢
这个排序数组:
sort($files, SORT_NUMERIC);
Run Code Online (Sandbox Code Playgroud)
这个1.jpg,2.jpg ......但是1.jpg,2.jpg,2-1.jpg,2-2.jpg怎么样.以上功能不对此类型进行排序.我怎么能这样做?
提前致谢
我有一个数据库,有一个 url 列,就像this-is-the-title.php
我想在这里激活 mod_rewrite :
Options +FollowSymlinks
RewriteEngine On
RewriteRule ^([a-zA-Z0-9-/]+)$ news.php?url=$1
RewriteRule ^([a-zA-Z0-9-/]+)/$ news.php?url=$1
Run Code Online (Sandbox Code Playgroud)
但我在.php扩展方面遇到问题。该规则仅适用于this-is-the-titlenot this-is-the-title.php。有没有什么方法可以使用具有 .php 扩展名的标题来激活 mod 重写,或者我必须更改标题?
提前致谢
我有两页:
index.php文件:
<?php
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$starttime = $mtime;
$text = '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
html content
</body>
</html>';
echo $text;
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$totaltime = ($endtime - $starttime);
echo "This page was created in ".$totaltime." seconds";
?>
Run Code Online (Sandbox Code Playgroud)
和index2.php:
<?php
$mtime = …Run Code Online (Sandbox Code Playgroud)