|
 |
|
สามารถแปลงโค้ด Jquery เป็น php ได้เปล่าครับ |
|
 |
|
|
 |
 |
|
<!DOCTYPE html>
<html>
<head>
<title>How to Upload multiple images jQuery Ajax using PHP | PGPGang.com</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<style type="text/css">
img {border-width: 0}
* {font-family:'Lucida Grande', sans-serif;}
</style>
<link href="css/uploadfilemulti.css" rel="stylesheet">
<script src="js/jquery-1.8.0.min.js"></script>
<script src="js/jquery.fileuploadmulti.min.js"></script>
</head>
<body>
<div id="mulitplefileuploader">Upload</div>
<div id="status"></div>
<script>
$(document).ready(function()
{
var settings = {
url: "upload.php",
method: "POST",
allowedTypes:"jpg,png,gif,doc,pdf,zip",
fileName: "myfile",
multiple: true,
onSuccess:function(files,data,xhr)
{
$("#status").html("<font color='green'>Upload is success</font>");
},
afterUploadAll:function()
{
},
onError: function(files,status,errMsg)
{
}
}
$("#mulitplefileuploader").uploadFile(settings);
});
</script>
</body>
</html>
ผมก็อปเขามาอัครับ
อันนี้เป็นโค้ดใน โค้ดนี้คือการอัพโหลดไฟล์รูปภาพ แต่ปัญหาของโค้ดนี้ พอเรากด Browse หารูปเสร็จมันก็อัพรูปอัตโนมัติเลย แต่ผมอยากเปลี่ยนให้มัน กดปุ่ม button แล้วค่อยอัพโหลด ผมเลยอยากรู้วิธีแปลงโค้ดแบบนี้เป็นการ ส่งข้อตาม form php ปกติได้ไหมแบบ ต้องการให้กด button แล้วค่อยเข้าไปทำ ฟังชั่นใน Jquery นี้อะครับ ขอบคุณครับ
Tag : PHP, HTML/CSS, jQuery

|
|
 |
 |
 |
 |
Date :
2014-05-21 18:30:23 |
By :
kenshero |
View :
931 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
มันเป็น jQuery UI ที่ทำงานร่วมกับ PHP แล้วครับ และไม่จำเป็นจะต้องแปลงเป็น PHP เพราะมันทำงานร่วมกัน และอาจจะต้องใช้ตามรูปแบบที่ UI มากำหนดมาให้ครับ
|
 |
 |
 |
 |
Date :
2014-05-22 08:42:49 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 00
|