官术网_书友最值得收藏!

Testing the DHTMLX installation>

We now have the necessary file structure and the index.html file created. This file includes the external DHTMLX CSS and JavaScript files for the application.

Next, we will talk about the Chrome developer tools and test if the DHTMLX library files were included correctly.

Open the Chrome web browser and navigate to http://localhost/ or http://localhost/index.html, loading the index.html file.

You should see a blank page displayed.

To make JavaScript development easy, Chrome provides the developer tools. This provides many useful tools for developing applications on the Web. The tool that we will focus on is the console. There are two ways to access the Chrome developer tools console window: through the Chrome menu or through keyboard shortcuts. Let's use the keyboard shortcuts approach. On Windows and Linux, the keyboard shortcut is Ctrl + Shift + J, and for Mac, it is Cmd + Opt + J. With the provided keyboard shortcuts, open the developer tools console window.

Inside the console window which you just opened, type the word dhtmlX. This will bring up the developer tools intellisense with all of the available properties and methods beginning with the word "dhtmlX". You should see something similar to the next screenshot:

Note

If the intellisense does not open or if you see errors in the console, check that you are including the files correctly.

Now, we will do a further test to check that the CSS is correct. For this we will add a DHTMLX layout object to the page.

Type the following line of code into the console and then press Enter:

 new dhtmlXLayoutObject(document.body);

The page is now divided into three separate containers as shown in the following screenshot:

Note

If you see only a gray screen, this means that you haven't added the height and width CSS styles to the html and body tag.

The three containers you see in the browser are the DHTMLX layout cells. These will be discussed in a later chapter. This simple test is enough to show that we have the files set up correctly. The installation and testing is now complete.

主站蜘蛛池模板: 龙岩市| 阿鲁科尔沁旗| 林口县| 锦屏县| 泸州市| 涿鹿县| 舟曲县| 察雅县| 韶山市| 宜黄县| 余江县| 泽普县| 阳东县| 来安县| 玛曲县| 上蔡县| 金塔县| 铜陵市| 桐梓县| 侯马市| 安阳市| 西安市| 特克斯县| 荆门市| 六盘水市| 宁津县| 荣昌县| 上蔡县| 高密市| 得荣县| 澜沧| 砀山县| 永丰县| 梅州市| 日喀则市| 朝阳市| 尚志市| 蓝山县| 海安县| 莱西市| 南昌市|