Category:JavaScript
-
Time:2019-12-15
Implement a simple API gateway with Tencent cloud function Intro The domain name of wechat applet needs to be filed, but there is no mainland server, and the filing is a little cumbersome. At first, all the applets that were made want to give up. Later, I learned about the cloud function of Tencent cloud, […]
-
Time:2019-12-15
Preface With the characteristics of “not occupying memory, i.e. using and walking”, and the social attributes of wechat, the number of users of wechat apps keeps growing rapidly. Its application requirements are also increasing, with more diversified and personalized use. Among them, the custom implementation of top navigation has become a common component to be […]
-
Time:2019-12-15
Post code directly! I. controller layer: @ResponseBody @RequestMapping(“entityFindByCode”) public String entityFindByCode(Entity bean, HttpSession httpSession, Model m,HttpServletResponse res) throws IOException{ res.setContentType(“text/plain; charset=UTF-8”); //res.reset(); //PrintWriter out = res.getWriter(); String data=null; @SuppressWarnings(“unchecked”) List<Entity> list = (List<Entity>) this.service.find(“beanByCode”, “Entity”, new Object[]{bean.getCode()}); if(list.size()==0){ data=”YES”; }else{ data=”NO”; } res.getOutputStream().write(data.getBytes()); //out.print(data); //out.flush(); //out.close(); return data; } II. HTML layer: $.ajax({ url :’entityFindByCode’, […]
-
Time:2019-12-14
0828 self summary Components in Vue I. components Component: it consists of three parts: template + CSS + JS (. Vue file) 1) reusability of components 2) when reusing components, data should be isolated 3) when reusing components, methods do not need to be isolated, because methods can make differences by using isolated data Component […]
-
Time:2019-12-14
The example of this paper describes the method of generating UUID by clicking in JS. To share with you for your reference, as follows: <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> < title > www.jb51.net method instance of generating UUID with JS < / Title > <script src=”http://libs.baidu.com/jquery/2.0.0/jquery.min.js”></script> <script> var id = getUuid(); $(document).ready(function() { […]
-
Time:2019-12-14
Reason: the data returned by the servlet is not in JSON format 1. JS code: var jsonStr = {‘clusterNum’:2,’iterationNum’:3,’runTimes’:4}; $.ajax({ type: “post”, //http://172.22.12.135:9000/Json.json url: “/LSHome/LSHome”, dataType : ‘json’, data : jsonStr, success: function(data,textStatus){ if(textStatus==”success”){ Alert (“create task successfully” + data); } }, error: function(xhr,status,errMsg){ Alert (“create task operation failed!”); } }); 2. Note that the […]
-
Time:2019-12-13
First of all, remove the redundant module in the background — > News mood — > mood configuration, and change the name to “like” to submit and save. The second is to modify the template file of news mood: / phpcms / templates / default / mood / index.html Delete all codes and only return […]
-
Time:2019-12-13
This article describes the drag and drop function of JavaScript using object-oriented. To share with you for your reference, as follows: There is a premise of object-oriented Premise: everything must be included in onload Override: cannot have function nesting, can have global variables Process, as follows Onload to constructor, Change global variable to attribute (via […]
-
Time:2019-12-13
Recently, the Alipay version of the same small program has been made recently. If you think about developing it two times, it should be very uncomfortable. Last November and December, two wechat applets were developed, one for shopping in the supermarket, the other for users and the other for merchants. Our team saw the uniapp, […]
-
Time:2019-12-12
Preface Can’tnode.jsThe front end of is not a good front end! These yearsnode.jsIt’s getting hotter and hotter. Many companies are rightnode.jsAll began to ask. Although the front end doesn’t have to know the back end, it wants to be an excellent front end,node.jsIs the only way. I’m interested innode.jsThe first impression is that it is […]
-
Time:2019-12-12
This theme, which was created a year ago, has also written some content, because the experience in the application is not perfect, and there are only drafts. After many platform practices and iterations, some functions have been added and decreased, and finally the most simplified version has been returned. It has been applied to most […]
-
Time:2019-12-12
The full name of AJAX is asynchronous JavaScript and XML. The advantages of Ajax: 1. The biggest point is that the page has no refresh, and the user experience is very good. 2. Use asynchronous mode to communicate with the server, with more rapid response ability.. 3. We can transfer some of the previous server […]