tôi có một biểu mẫu bên trong bằng cách sử dụng php. Tôi đang điền vào các trường của hộp văn bản và đặt nó ở chế độ chỉ đọc. bây giờ tôi muốn lấy các giá trị hộp văn bản chỉ đọc thành các biến trong javascript và thực hiện xác thực. Sau khi tải tài liệu, tôi đang cố lưu trữ các giá trị vào các biến, tôi nhận được chuỗi rỗng. có thể làm như thế này không. làm ơn giúp tôi. Cảm ơn trước.
CAPACITY
TO BE ALLOTED
Những gì tôi đã thử
$[document].ready[function[]{ debugger; var aloted=$["#fld1"].val[]; var capacity=$["#cpcty1"].val[]; var aloted2=$["#fld2"].val[]; var capacity2=$["#cpcty2"].val[]; var aloted3=$["#fld3"].val[]; var capacity3=$["#cpcty3"].val[]; $["#cpcty1"].change[function[]{ alert[aloted]; alert[capacity]; }]; }];Cố gắng lưu trữ giá trị trong các biến javascript trực tiếp thông qua php như _______________
Thêm giải pháp của bạn ở đây
B I U S small BIG code
var
& link [^] encode untab case indent outdentXem trước 0
thành viên hiện có
hoặc tham gia với chúng tôi
Tải xuống, Bình chọn, Nhận xét, Xuất bản
Email của bạn Email này đang được sử dụng. Bạn có cần mật khẩu của bạn?
Mật khẩu tùy chọnKhi trả lời một câu hỏi xin vui lòng
Hãy làm việc để giúp các nhà phát triển, không làm họ cảm thấy ngu ngốc
- Đọc kỹ câu hỏi
- Hiểu rằng tiếng Anh không phải là ngôn ngữ đầu tiên của mọi người, vì vậy hãy khoan dung với lỗi chính tả và ngữ pháp
- Nếu một câu hỏi được diễn đạt kém thì hãy yêu cầu làm rõ, bỏ qua nó hoặc chỉnh sửa câu hỏi và khắc phục sự cố. Xúc phạm không được chào đón
- Đừng bảo ai đó đọc hướng dẫn. Rất có thể họ có và không nhận được. Đưa ra câu trả lời hoặc chuyển sang câu hỏi tiếp theo
Nội dung này, cùng với bất kỳ tệp và mã nguồn liên quan nào, được cấp phép theo Giấy phép Mở Dự án Code [CPOL]
This post is with regards to handling forms that have more than one submit button.
Suppose we have an HTML form with a submit button specified like this:
________số 8_______
$_POST['action_button'];
?>
We of course use the 'name' of the button as an index into the $_POST array.
This works fine, except when we want to pass more information with the click of this particular button.
Imagine a scenario where you're dealing with user management in some administrative interface. You are presented with a list of user names queried from a database and wish to add a "Delete" and "Modify" button next to each of the names in the list. Naturally the 'value' of our buttons in the HTML form that we want to display will be "Delete" and "Modify" since that's what we want to appear on the buttons' faceplates.
Both buttons [Modify and Delete] will be named "action_button" since that's what we want to index the $_POST array with. In other words, the 'name' of the buttons along cannot carry any uniquely identifying information if we want to process them systematically after submit. Since these buttons will exist for every user in the list, we need some further way to distinguish them, so that we know for which user one of the buttons has been pressed.
Using arrays is the way to go. Assuming that we know the unique numerical identifier of each user, such as their primary key from the database, and we DON'T wish to protect that number from the public, we can make the 'action_button' into an array and use the user's unique numerical identifier as a key in this array.
Suppose we have an HTML form with a submit button specified like this:
0
Suppose we have an HTML form with a submit button specified like this:
1
Suppose we have an HTML form with a submit button specified like this:
2
Suppose we have an HTML form with a submit button specified like this:
3
Suppose we have an HTML form with a submit button specified like this:
4
Suppose we have an HTML form with a submit button specified like this:
5
Suppose we have an HTML form with a submit button specified like this:
6
Suppose we have an HTML form with a submit button specified like this:
7Tôi có thể biết nếu trong php tôi có thể gán giá trị hộp văn bản từ đầu vào của người dùng dưới dạng biến và sau đó hiển thị kết quả trong cùng một trang
giả sử, người dùng nhập ngày nhận phòng và ngày trả phòng, sau đó nó sẽ tự động hiển thị số ngày người dùng sẽ ở khách sạn
mọi đề xuất sẽ thực sự đánh giá cao vì tôi không biết mình nên làm gì…
dưới đây là mã
SistemAPOS
Check Room Availbility
Date In Calendar.setup[ { inputField : "datein", // ID of the input field ifFormat : "%Y-%m-%d", // the date format button : "dateA" // ID of the button } ]; document.write[ifFormat];
Date Out Calendar.setup[ { inputField : "dateout", // ID of the input field ifFormat : "%Y-%m-%d", // the date format button : "dateB" // ID of the button } ]; document.write[ifFormat];
Number of Days : Supposely this is the place where it will display how many days the user will stay
Làm cách nào để đặt giá trị biến PHP trong hộp văn bản?
$variable='myvalue'; . biến $. .Chủ Đề