Web development, must encounter like Baidu, Google this kind of search function, that intelligent form of automatic completion can do, the following to reveal:
1, including such as Google, Baidu and other similar simple search
2, the complex structure of support, such as the input product number, the product needs to be the number, product name, product price, product information, such as the note will fill out a place in the
Web development, certainly encountered like Baidu, Google this search function bar, that intelligent form of automatic completion can do what, the following to announce:1, including like Google, Baidu and other similar simple search2, complex structure support, such as input product number, need to product number, product name, product price, product notes, etc. fill in the form of a locationThe code is as
. form-control--assigns individual form controls to some global styles, such as the default width width:100%;. form-group--wrap the form controls to get the best arrangement;. form-inline--set the form as an inline
When making a form, it is unavoidable to make form verification. You also need to provide validation status styles, which are also available in the bootstrap framework.
1. Has-warning: Warning Status (yellow)
2. Has-error: Error status (red)
3. Has-success: Success status (Green)
You only need to add the State class name on the
Like the provinces and cities to choose this, but everyone must have seen, there are many ways to achieve1. Have the first level of choice to load or from the local object to the first level corresponding data source display to the list, the second level and so on2. There are also all items loaded into select and then associated to show or hide items unrelated to the previous levelFeeling is the second kind of simple, so use the second way to achieve, the rest of the nonsenseThe code is as follo
. Posttime)@Html. editorfor (model = model. Posttime, new {htmlattributes = new {@class = "Form-control"}})@Html. validationmessagefor (model = model. Posttime, "", new {@class = "Text-danger"})}The more general original HTML tags are: Class="Form-horizontal" Role="Form"> Class="Form-group"> For="FirstName" Class="Co
/employeelogin ', /*A string of data Key=value that can be passed the serialized data format Object [{name: ', value},...]*/data: $form. Serialize (), DataType:' JSON ', Success:function(data) {/*logic after a successful response*/ if(data.success) {location.href= '/admin/index.html '; }Else{ if(Data.error = = 1000){ /*Call the check plug-in to set this option to verify that the faile
Text Field textarea and bootstraptextarea of the BootStrap Form Control
1. Running Effect
2. The implementation code is as follows:
The above is the text field textarea of the BootStrap form control introduced by xiaobian. I hope it will help you. If you have any questions, please leave a message and I will reply to
displayed, greater than this value is hidden (and, toggle display is right floating, and as a relative positioning element):
. Navbar-toggle{position:relative;float: Right;Margin-right:$navbar-padding-horizontal;padding:9px 10px;@include navbar-vertical-align (34px); Background-color:Transparent;Background-image:None;//Reset unusual firefox-on-android default style; see HTTPS://github.com/necolas/normalize.css/issues/214 border:1px Solid Transparent;Border-radius:$border-radius-base;//We R
After using bootstrap, he was has-error by his own style, it would be more troublesome to use it, the usual use of jquery.validate words only use his own style, and there are models in the use of model validation more convenient point. How to solve it?
Of course, you can write a specific jquery plugin for this, I feel quite troublesome, like to write plug-ins under the study.
First NuGet gets an MVC editortemplates for
In Bootstra, form elements, buttons can be disabled by setting disabled or disabled= "disabled" within the label. Links need to be added class= "disabled" to disable links.text box is disabled:Disable the Combined form: if the Filedset label is disabled, all the form elements in it are disabled, including the Child text box, drop-down list. Disabled> Class="
Reference Links:Application example and extension of CSS3 Pointer-events:noneFirst of all, the application of pointer-events in the removal of SVG has only two values:AUTO | NONEPointer-events:noneThis property allows the element that applies this property to become "vacuum", for example: A connection is covered with a div, and when the attribute is in the CSS property of the Div, the div is as if it does not exist, and can be clicked directly below the a tag.This is a very magical property,
Sometimes we need to display the form's controls in one line. It is easy to implement such a form in the bootstrap framework, you only need to add the class name "Form-inline" to the If you want to add a label label in front of input, it causes input to be displayed in a newline. If you have to add a label like this, and you don't want input to wrap, you need to
Bootstrap contains a wealth of Web components that allow you to quickly build a beautiful, full-featured Web site. These include the following components: Drop-down menus, button groups, button pull-down menus, navigation, navigation bars, breadcrumbs, pagination, typography, thumbnails, warning dialogs, progress bars, media objects, and so on, and now we talk about form validation. Project structure:
GitH
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.