摘要: 获得返回行数1 $objSelect = $db->select()->from(array('u'=>'cmb_user'),array('COUNT(1)'))2 ->where('u.account = ?',$account);3 $num = $db->fetchOne($objSelect,null,Zend_Db::FETCH_OBJ);返回插入的ID1 $db->lastInsertId(); 阅读全文
posted @ 2012-06-12 22:34 绒花雪冷 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 不使用view1$this->_helper->viewRenderer->setNoRender();Ajax相关 1 class AjaxRes 2 { 3 const STATUS_SUCCESS = 0; 4 const STATUS_ERROR = 1; 5 private $_arrRes; 6 function __construct(){ 7 $this->_arrRes = array('status'=>self::STATUS_SUCCESS,'statusinfo'=>'操作成功'); 阅读全文
posted @ 2012-06-12 22:31 绒花雪冷 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 1 function isEmail(str){ 2 var reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/; 3 return reg.test(str); 4 } 5 6 1:js 字符串长度限制、判断字符长度 、js限制输入、限制不能输入、textarea 长度限制 7 8 <script> 9 10 function test() 11 12 { 13 14 if(document.a.b.value.length>50) 15 16 { 17 18 alert("... 阅读全文
posted @ 2012-06-12 15:14 绒花雪冷 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 1 html> 2 <head> 3 <title>中国站长天空-网页特效-表单特效-给文本框添加灰色提示文字</title> 4 <meta http-equiv="content-Type" content="text/html;charset=gb2312"> 5 </head> 6 <body> 7 <!--把下面代码加到<body>与</body>之间--> 8 <input type="text" id= 阅读全文
posted @ 2012-06-12 07:31 绒花雪冷 阅读(395) 评论(0) 推荐(0) 编辑