It has been some time since the company's project was transformed to HTML5, and it has been some time to develop it here. In many cases, PC browsers and mobile browsers have different effects, so we need to browse them in real time.
Method
The first problem is that we need to access our own web pages through mobile devices.
Install a server on your computer: Apache or IIS
If you configure the following
======= Install apahce ============================
Install apahce
Download Apache installation from the official website
Installation may fail. Either the port is occupied or the path is incorrect;
Port error:
Use doscommandViewPortProcess number, and then compare the task process number to find out.
C: \ Documents ents and Settings \ Administrator> netstat-ano
Active connections
PROTO local address foreign address State PID
TCP 0.0.0.0: 80 0.0.0.0: 0 listening 3676
TCP 0.0.0.0: 135 0.0.0.0: 0 listening 1592
TCP 0.0.0.0: 445 0.0.0.0: 0 listening 4
C: \ Documents ents and Settings \ Administrator> tasklist
Image name PID session name session # memory usage
========================================================== ======================================
Iexplore.exe 5300 console 0 43,252 K
Thunder5.exe 3676 console 0 14,220 K
Conime.exe 5840 console 0 4,616 K
Find the program that occupies port 80 and end it;
Sometimes you cannot end the program that uses port 80 and then modify the Apache port;
Find the httpd. conf file in the Apache installation path C: ** \ apache2.2 \ conf,
Open in a text editor
Locate listen 80 and modify listen 8888.
The port you need,
Modify the DocumentRoot directory for your HTML5 development project;
Modify servername 192.168.20.111: 8888 (your address: port number );
Restart apahce and enter 192.168.20.111: 8888 in the mobile browser to access the service.
= ======
Click here to view the configuration details
========================================================== ==========
The local file server is ready. Of course, it can also be placed in Tomcat.
The following describes a page debugging tool.
Weinre
It can debug your webpage on your mobile phone in real time
Find a more detailed blog (I will not use the code here, thanks to this solves many problems in our project ~~~);
You can also debug the native app ~
==============
I personally think that I should first build a framework with a PC browser, and then use a real machine to test and fix small bugs.
Not recommended Simulators
OK. Write it here!
Prepare to go home ~~