`
lzquan
  • 浏览: 197713 次
  • 性别: Icon_minigender_1
  • 来自: 东莞
社区版块
存档分类
最新评论
文章列表

Ext Grid 多选

    博客分类:
  • Ext
//显示策略下发情况的表格grid             var check_select = new Ext.grid.CheckboxSelectionModel();     var cm = new Ext.grid.ColumnModel([             new Ext.grid.RowNumberer(),check_select,             {header:'ID',dataIndex:'id',width:50,sortable:true},         {header:'名称',dataIndex:'name',width:100,sortabl ...
Ext.QuickTips.init();//显示消息 //自定义验证 var textf  = new Ext.form.TextField({     fieldLabel: '文本框',     name: 'text',             //在下面写正则表达式,验证电话的              //\d{3}-\d{8}|\d{4}-\d{7}            //验证0511-4405222 或 021-87888822     regex: /^[\u4E00-\u9FA5]+$/,     regexText: '只能输入汉字' });

EXT 搜索分页

    博客分类:
  • Ext
tbar: [                    s_pannel,//搜索表单                    {                        text: '搜索',                           handler:function(){                              // 这里是关键,重新载入数据源,并把搜索表单值提交                              ds.load({                                      params:{start:0, limit: ...
<?php $myServer = "localhost"; $myUser = "your_name"; $myPass = "your_password"; $myDB = "examples"; //connection to the database $dbhandle = mssql_connect($myServer, $myUser, $myPass)   or die("Couldn't connect to SQL Server on $myServer"); ...

php获取当前页

    博客分类:
  • PHP
<?php function curPageURL() {  $pageURL = 'http';  if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}  $pageURL .= "://";  if ($_SERVER["SERVER_PORT"] != "80") {   $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER[" ...

php 文件上传

    博客分类:
  • PHP
form html: <form enctype="multipart/form-data" action="upload.php" method="post">     <input type="hidden" name="MAX_FILE_SIZE" value="1000000" />     Choose a file to upload: <input name="uploaded_file" type=" ...
ow to connect to MySQL database using PHP Before you can get content out of your MySQL database, you must know how to establish a connection to MySQL from inside a PHP script. To perform basic queries from within MySQL is very easy. This article will show yo ...
DSN and DSN-less connections DSN stands for 'Data Source Name'. It is an easy way to assign useful and easily rememberable names to data sources which may not be limited to databases alone. If you do not know how to set up a system DSN read our tutorial How ...
CAPTCHA is a simple test to determine if a user is a computer or a human. It is used to prevent spam abuse on the websites. So if you use CAPTCHA on your web site forms, this can help in stopping some bots and making life harder for other bots in accessing or using your forms. In brief the CAPTCHA p ...
<?php function createThumbs( $pathToImages, $pathToThumbs, $thumbWidth ) {   // open the directory   $dir = opendir( $pathToImages );   // loop through it, looking for any/all JPG files:   while (false !== ($fname = readdir( $dir ))) {     // parse path for the extension     $info = pathinfo( ...
Regular Expression Will match... foo The string "foo" ^foo "foo" at the start of a string foo$ "foo" at the end of a string ^foo$ "foo" when it is alone on a string [abc] a, b, or c [a-z] Any lowercase letter [^A-Z] Any character that is not a  ...

php 数组(array)

    博客分类:
  • PHP
Arrays can be used in many ways to store and organize data quickly and efficiently. It is one of the more useful data types available to any programming language. Arrays can most easily be described as an ordered list of elements. You can access the individual elements by referring to their index po ...
网上搜了一下给下拉框设置默认值.没找到答案.....自己想了个办法解决这个问题.. 下拉框的形式出现最终提交要获取的值是它的value而不是文本值.EXT里面赋值的时候文本值跟value都是同一个了.可能是原理没搞太清楚,不过当时为了解决问题,还是想了别的办法.所以我这里多增加了一个隐藏的表单. 每次取下拉的值不是从下拉框组件取了,而是从隐藏的表单取值. 不过要同时给下拉框加个事件,选中的下拉值赋给隐藏表单.通过这种方式我把问题解决了.   后面找到一段代码.可以参考一下,我自己也没有试,不知道成不成功.....   var emplyoees = new Ext.form.ComboBox({ ...
/*****************右键按钮定义*********************/         var treeRightMenu = new Ext.menu.Menu({         id: 'theContextMenu',         items:[{                 id:'policy_apply',                 text:'策略应用',                 iconCls:'connected_user'             },'-',             {                 id:'v ...
//给tree创建一个可修改的容器,即TreeEditor         var treeEditer = new Ext.tree.TreeEditor(             Ext.getCmp('tree-menu'),//将tree组建的实例放入             {                 allowBlank: false,//输入的值不可以为空                 blankText:'名称不允许为空!'             }         ); //beforestartedit事件是在编辑前的事件,因此可以通过它来判断那些节点可以编辑那 ...
Global site tag (gtag.js) - Google Analytics