javascript - Can the html page use js to directly call the interface?
巴扎黑
巴扎黑 2017-05-16 13:10:19
0
6
392

The company is building a shopping mall website with a Java interface, but my friend only knows HTML and does not know back-end languages.
In terms of feasibility, all the pages of the mall use js cross-domain and remove the interface, without any background language. Can such a project be completed?

巴扎黑
巴扎黑

reply all(6)
给我你的怀抱

The oldest front-end and back-end separation is like this. HTML files are placed on the static server. The browser accesses the static server to get the HTML and other resource files. After parsing, it sends an ajax request to the backend interface. The backend returns the data in Fill in the browser.

The static server serves as the entrance, provides static file services, and forwards interface requests, so there is no need to cross domains.

The disadvantage of this solution is the SEO problem. If SEO is not considered, this architecture is feasible.

小葫芦

Yes, it will be no problem if the backend interface allows cross-domain access

Nowadays, many people use this method to separate the front and back ends. The front end only needs to do routing and data binding

淡淡烟草味

Yes, use CORS cross-domain.

Peter_Zhu

Yes, no problem

给我你的怀抱

No problem, you can. Use http protocol

淡淡烟草味

Use JSONP

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template