Php basic tutorial-2 create templates, process forms, basic tutorial forms
1. Create a template:
Copy the frequently-seen part of the page to an html or PHP file, and introduce it using the require ()/include () function in the original page.
Example:
Source html:
Copied header: header.html:
Copy tail: footer.html:
Merging template: ws. php
2. process forms
PHP uses forms to access Single and Multiple form values. The ability to easily operate information submitted by users through HTML forms has always been one of the advantages of php (as the mainstream development language. As a matter of fact, php (as the mainstream, it is easier to operate on the information submitted by users through HTML forms) has always bee
PHP forms prevent refreshing and submission methods. php forms are refreshed and submitted. Certificate ------------------------------------------------------------------ PHP forms prevent refreshing and submitting php forms.
From http://bbs.chinaunix.net/thread-667547-1-1.html
----------------------------------------
Question about Dynamically adding html modules and submitting forms in jsp: jsp forms
Several questions about Dynamically adding html modules and submitting forms in jsp.
Corresponding project: market
Module: PesticideCheck
Case: Add sampling sub-objects dynamically (multiple Entity combinations)
Solution: Use the DOM model flexibly
function addItem(obj) {
Pass values between forms, and pass values between forms
Click button event in the Form1 form:Private void button#click (object sender, EventArgs e) {// Method 1: Pass the current Form as an object to the show Form frm = new Form2 (); frm. owner = this; frm. show ();
}Form load loading events and Button clicking events in Form2Private void Form2_Load (object sender, EventArgs e) {Form1 frm = (Form1) Owner;
Xamarin. Forms + Prism (2) -- basically use NavigationService, xamarin. forms
This article describes and uses the NavigationService In the Prism framework.
1. Open VS and you can see the installed templates on the left:
2. After creation, you can see the code in App. xaml. cs in the pcl project. The current logic of the program is to open APP-> NavigationPage-> MainPage (pass the title parameter );
3. Add
Win7
Python2.7
Django 1.6.5
Because the database SQLite is used and the project contains models. py, forms. modelform is easy to use to process forms.
The default defastorage storage is used to upload image files.
1. Add two media definitions in settings. py:
#MediaMEDIA_ROOT = 'e:/Depot/media'MEDIA_URL = '/media/'
2. Models. py
# Coding: utf8from Django. DB import modelsclass product (models. model):
Regular Expressions used by php forms and php forms
Php forms are commonly used regular expressions. The Code is as follows:
Function is_email ($ str) {// check email return preg_match ("/^ \ w + ([-+.] \ w +) * @ \ w + ([-.] \ w + )*\. \ w + ([-.] \ w +) * $/", $ str);} function is_url ($ str) {// check the URL return preg_match ("/^ http: \ // [A-Za-z0-9] + \.
Multiple verification of easyui forms, dynamic setting of easyui controls, and forms of easyui
Features to be implemented: when adding student information, use the easyui verification function to determine whether the student ID is repeated and the student ID can only be a number.
The final effect is as follows:
However, in this process, we encountered a series of problems:
Extended the validatebox verific
A Bug about System. Windows. Forms. DateTimePicker, system. windows. forms
I received a feedback from the customer today, saying that their system could not query the bill for July. The reason is that they could not select July, and they could not select July ???, Start vs immediately and run the system. It should be the last year's system, and the test data was last year. The data for March was queried. E
Let's talk about how Ajax submits form forms, and how ajax submits form forms.
Ajax (ajax Development)
AJAX is "Asynchronous Javascript And XML" (Asynchronous JavaScript And XML), which is a Web page development technology used to create interactive web applications.
AJAX = Asynchronous JavaScript and XML (subset of standard General Markup Language ).
AJAX is a technology used to create fast dynamic web pag
WinFrom forms always stick, WinFrom forms stick
You can call WindowsAPI to keep the form sticky:
[DllImport ("user32.dll", CharSet = CharSet. auto)] private static extern int SetWindowPos (IntPtr hWnd, int hWndInsertAfter, int x, int y, int Width, int Height, int flags ); ///
Usage: add
// Load private void Form1_Load (object sender, EventArgs e) {try {SetWindowPos (this. handle,-1, 0, 0, 0, 0, 1 | 2);
Simple jsp exercises-simple drop-down forms and jsp drop-down forms
How to submit a form after the drop-down list value in jsp is changed without clicking the query button
Onchange = "form. submit ();" replace it with a js function. input the form id and submit it in the function.For example, function selectSubmit (){GetElementById ("form1"). submit;}Simplest jsp program-form submission
Web. xml does not
Main interface:Code in FORM1:Namespace _06 Delegate Practice _ form Pass Value{public partial class Form1:form{Public Form1 (){InitializeComponent ();}private void Btn1_click (object sender, EventArgs e){Form2 f2=new Form2 (txt1. TEXT,DOSTH);//Pass a string and Dosth methodF2. Show ();}Assigning the value of a string variable to a text boxpublic void Dosth (String str){This.txt1.Text = str;}}}Code in FORM2:Namespace _06 Delegate Practice _ form Pass Value{public delegate void Mydel (string str);
lines add background color, but only support ie9+*/View Code
CSS Creation table display:Body> DivID= "Tablecontainer">Table Body - DivID= "TableRow">Line - DivID= "Main">Cell Cell - .... Div> DivID= "sidebar">Cell Cell - .... Div> Div> Div>Body>View Code#tablecontainer { display:table; border-spacing:10px;/* the space created by this and the margin will not collapse */} #tablerow { display:t
Form:Basic structure:"You can add tables individually in each cell in the table"Properties of Table:Width: WideBorder: BorderAlign: Alignmentbgcolor: Background colorBackground: Background imageCellPadding: The distance between the content and the cell border, the internal distanceCellSpacing: Distance between cells, external distanceProperties of TRAlign: line content horizontal alignmentvalign: line Content Vertical alignmentHeight: Row Heightbgcolor: Background colorBackground: Background ima
FormTable Properties table{border-collapse:collapse; Merge cell borders}Colspan: Merge columns rowspan: merge rows; Cellpading: Cell padding cellspacing: cell extra margin; [Write directly inside the table tag]FormOutline:none cursor Line;A brief introduction to the related labels of forms and forms my summary
function Hidden_edit () { // Hide Edit Clerk $ (". Form-horizontal") [0].reset (); // The name value in the Reset form must correspond to the name value of the database, and when the return key is pressed, the contents of the form cannot be reset, and if an item name cannot be reset, it means that the name value in the database does not have a $ (". Y-edit"). css ("Display", "none"); $ (". Y-clerk"). CSS ("Display", "block"); }// Backgr
Copy CodeThe code is as follows:
/*** Page function: Common Forms Validation Class* Author: Gladly with the wind* Setup Time: 2006-3-6* qq:276624915*/Class Class_post{Verifies whether a combination of letters/numbers of a specified lengthfunction Fun_text1 ($num 1, $num 2, $STR){Return (Preg_match ("/^[a-za-z0-9]{". $num 1. ",". $num 2. "} $/", $str))? True:false;}Verifies whether a number is a specified lengthfunction Fun_text2 ($num 1, $num 2, $S
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.