- 浏览: 197713 次
- 性别:
- 来自: 东莞
最新评论
-
duanyong:
php和mssql的中文问题怎么解决的呢?
php 连接 MSSQL -
hezhq85108:
js部分不可用,怎么回事?可以这么混编吗???[color=r ...
JS二级联动下拉列表 PHP实现 -
406047898:
406047898 写道
Ext中怎么给下拉框(combobox)设置默认值? -
406047898:
...
Ext中怎么给下拉框(combobox)设置默认值? -
406047898:
...
Ext中怎么给下拉框(combobox)设置默认值?
文章列表
//显示策略下发情况的表格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 ...
- 2008-12-01 23:48
- 浏览 4690
- 评论(0)
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: '只能输入汉字'
});
- 2008-12-01 23:46
- 浏览 1592
- 评论(0)
tbar: [
s_pannel,//搜索表单
{
text: '搜索',
handler:function(){
// 这里是关键,重新载入数据源,并把搜索表单值提交
ds.load({
params:{start:0, limit: ...
- 2008-12-01 23:45
- 浏览 1435
- 评论(0)
<?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");
...
- 2008-12-01 23:42
- 浏览 966
- 评论(1)
<?php
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER[" ...
- 2008-12-01 23:41
- 浏览 1493
- 评论(0)
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=" ...
- 2008-12-01 23:40
- 浏览 878
- 评论(0)
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 ...
- 2008-12-01 23:40
- 浏览 1438
- 评论(0)
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 ...
- 2008-12-01 23:38
- 浏览 939
- 评论(0)
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 ...
- 2008-12-01 23:37
- 浏览 1124
- 评论(0)
<?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( ...
- 2008-12-01 23:36
- 浏览 979
- 评论(0)
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 ...
- 2008-12-01 23:36
- 浏览 1023
- 评论(0)
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 ...
- 2008-12-01 23:33
- 浏览 1047
- 评论(0)
网上搜了一下给下拉框设置默认值.没找到答案.....自己想了个办法解决这个问题..
下拉框的形式出现最终提交要获取的值是它的value而不是文本值.EXT里面赋值的时候文本值跟value都是同一个了.可能是原理没搞太清楚,不过当时为了解决问题,还是想了别的办法.所以我这里多增加了一个隐藏的表单.
每次取下拉的值不是从下拉框组件取了,而是从隐藏的表单取值.
不过要同时给下拉框加个事件,选中的下拉值赋给隐藏表单.通过这种方式我把问题解决了.
后面找到一段代码.可以参考一下,我自己也没有试,不知道成不成功.....
var emplyoees = new Ext.form.ComboBox({ ...
- 2008-12-01 23:28
- 浏览 15297
- 评论(3)
/*****************右键按钮定义*********************/
var treeRightMenu = new Ext.menu.Menu({
id: 'theContextMenu',
items:[{
id:'policy_apply',
text:'策略应用',
iconCls:'connected_user'
},'-',
{
id:'v ...
- 2008-12-01 23:26
- 浏览 6315
- 评论(0)
//给tree创建一个可修改的容器,即TreeEditor
var treeEditer = new Ext.tree.TreeEditor(
Ext.getCmp('tree-menu'),//将tree组建的实例放入
{
allowBlank: false,//输入的值不可以为空
blankText:'名称不允许为空!'
}
);
//beforestartedit事件是在编辑前的事件,因此可以通过它来判断那些节点可以编辑那 ...
- 2008-12-01 23:24
- 浏览 2238
- 评论(0)