标签:pos style outline result class attr sql use 数组
1. 去掉input 点击后出现的边框
css文件里加句话:*:focus { outline: none; } 或 input {outline:none;}
2.判断某一个元素是不是在数组里面
<?php $uid = $_POST["uid"]; $pwd1 = $_POST["pwd1"]; $pwd2 = $_POST["pwd2"]; include("./DBDA.class.php"); $db = new DBDA(); $sql = "select username from username"; $attr = $db->Query($sql); foreach($attr as $v) { $attr1[]=$v[0]; } $result = array_search($uid, $attr1);//返回结果是flase或者true if ($result == false) { echo "没有重复"; } else//也就是$result==true { echo "有重复"; }
标签:pos style outline result class attr sql use 数组
原文地址:http://www.cnblogs.com/Strive-count/p/6091415.html