Normal button for form validation

Simply make a record. If the button is not a submission button in the form form, there is no form submission event. We need to register an event for the button separately. Here, register a form validation event. $("#btnSave").click(function () { var groupId = $("#groupId").val(); if(validform().form()) { //Through form validation, write your own code below./ / form validation is successfully executed.Var url = path + "/GroupCustomer.do? Action=toAddAndUpdate& id=" +gRoupId;$("#editWin").Window ("close");GetVpnInfoData ();$.ajax ({Method:'get',Async:faLSE,Data: $("#data_form").Seri...

MySql Delete does not take index problem.

If the delete statement has a query, the wrong way to write will result in no indexing. Simple and crude way: remove two SQL, a query, a delete ======================= 【No index writing. DELETE FROM goods_item_combo_group_item_history WHERE group_id IN (SELECT id FROM goods_item_combo_group_history WHERE lease_code = 'schjyzzh' AND item_code = 'YL180606110506793' AND gmt_modified = '2018-06-07 23:18:51') 【Index writing DELETE goods_item_combo_group_item_history FROM goods_item_combo_group_item_history, goods_item_combo_group_history WHERE goods_item_...

JS seamless rotation

Method manual settingHTML:<!--<div class="box"> <div class="winBox"> <ul class="scroll"> <li><a href="#">Fashion casual pants 68 yuan < /a> < /li>< li> < a href="#">Woolen sweater 38 yuan < /a> < /li>< li> < a href="#">The new snow boots are 88 yuan < /a> < /li>< li> < a href="#">Thickening flannel 108 yuan < /a> < /li>< li> < a href="#">Panty hose 19 yuan, 2 pairs of < /a> < /li>< li> < a href="#">Fashion...

Vue-slot slot

The components you want to provide contain a reusable slot that can get data from the sub components. It is hoped that each independent item will render something different. This is also the application of scope slot. todo-listComponents: <ul> <li v-for="todo in todos" v-bind:key="todo.id" > {{ todo.text }} </li></ul> To make this feature possible, all you need to do is wrap the to-do items in one<slot> Element and then pass all the data related to its context to this slot: In this case, the data istodo Object: <ul> <li v-for="todo in t...

Vue2.0’s three commonly used values, parent, child and non parent components.

In Vue framework development projects, components are often used to manage different functions, and some common components are extracted. There must be some doubts and needs at this time. For example, if one component calls another component as its own subcomponent, how do we pass values to the subcomponentWhat? If it is the development of e-commerce website system, will also involve shopping cart options, this time will involve non-parent component value transfer. Of course, you can also use the Vuex state management tool to implement this part, which we will introduce later. Let me first in...

After Django models.py increases, no corresponding tables are generated in MySQL database.

According to the tutorial, it was wrong to add and save quest. 1.models.pyThere is no mistake in naming it. 2.Check INSTALLED_APPS under mysite-> settiongs settings are correct.   3.Using Python manage.py makemigrations polls has no modified content. 4.Check 0001_***.py normal Resolvent: 1.Delete all files except __init__.py under migrations. 2.python manage.py makemigrations polls 3.python manage.py migration 4.View database has generated corresponding table  

JS function reference

 Maybe people don’t care too much about the parameters of a function. Simply speaking, copying values outside a function to parameters inside a function is the same as copying values from one variable to another. In-depth study, you’ll find that it’s not that simple. There are two situations in which to pass on the message (which is a mistake).,ECMAScriptThe parameters of all functions are passed by value.——《Elevation 3 The original words, here said two, because the combination of reference is easier to understand) – value reference and reference reference re...

Seven ways to create JavaScript objects

> can be transformed into such strings.Person > attribute.username > Two:json   json isjs completes the description of the object. <script type="text/javascript"> var person = { name:"Zhang three ",//It is represented by attribute name: attribute value. age:23, say:function() { alert(this.name+","+this.age); }//No one can be found after the last attribute. } person.say(); /** * JSON can still create an array of objects, creating the same way as JS arrays.*/ var ps = [ {name:"Leon",age:22}, {name...