-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjquery_method.php
More file actions
82 lines (74 loc) · 2.46 KB
/
Copy pathjquery_method.php
File metadata and controls
82 lines (74 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
/**
* Created by PhpStorm.
* User: chenyunhe
* Date: 2016/10/25
* Time: 18:58
* jquery两种请求方式
*/
/*
function jquerypost(){
$.post("c_pay_list.php?action=tidan",{mailcontent:$('#mailcontent').val(),remark:$('#remark').val(),sendgold:$('#sendgold').val(),ischarge:$("input[name='ischarge']:checked").val(),bind:$("input[name='bind']:checked").val(),prop:$('#prop').val(),propnum:$('#propnum').val(),zone:$('#zone').val(),name:$('#uname').val(),openid:$('#openid').val(),billno:$('#billno').val()},
function(data){
msg = data['msg'];
alert(msg);
$('#tidanfm').form('clear');
$('#dlg').dialog('close');
$('#dg').datagrid('reload');
},
"json");//这里返回的类型有:json,html,xml,text
}
function jqpost(){
$.post("opAllGameActivity.php?action=del",{zone1:minzone,zone2:maxzone,acttype2:acttypevalue,actid2:actidvalue,actstate2:3,stime:stime},function(data){alert(data);})
}
function jqueryget(){
starttime = $('#starttime').val();
endtime = $('#endtime').val();
zone = $('#ZONE').val();
openid = $('#ACC').val();
name = $('#NAME').val();
gs_user = $('#gs_user').val();
$.get("c_achievements.php?action=gettotal&zone="+zone+"&openid="+openid+"&name="+name+"&gsuser="+gs_user+"&starttime="+starttime+"&endtime="+endtime,function(result) {
$('#zonge').val(result);
});
}
function ajax(f_NAME,f_ITEMGOT,f_MAILTITLE,zone)
{
if(confirm("注意:确定?取消?"))
{
$.ajax(
{
type:'POST',
url:'c_giftinfo.php?action=del&zone='+zone,
data:{f_NAME:f_NAME,f_ITEMGOT:f_ITEMGOT,f_MAILTITLE:f_MAILTITLE},
success:function()
{
$("#ht_id_search1").click();
}
});
$("#ht_id_search1").click();
}
}
*/
/*
* php自动生成新密码自定义函数(带实例演示)
适用环境: PHP5.2.x / mysql 5.0.x
代码作者: xujiajay www.jbxue.com
联系方式: [email protected]
* */
function genPassword($min = 5, $max = 8)
{
$validchars="abcdefghijklmnopqrstuvwxyz123456789";
$max_char=strlen($validchars)-1;
$length=mt_rand($min,$max);
$password = "";
for($i=0;$i<$length;$i )
{
$password.=$validchars[mt_rand(0,$max_char)];
}
return $password;
}
echo "新密码:".genPassword()."";
echo "新密码:".genPassword(5,10)."
";
?>