從零開始學習ExtJs6系列教程一【Hello World】
我們在學校裡學習任何一門語言都是從"Hello World"開始,這裡我們也不例外。
那麼我們的教程就從 Hello World 講起。
helloWorld.js
Ext.onReady(function() {
Ext.MessageBox.alert('系統提示', 'Hello World!');
});
helloWorld.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<title>hello Word</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!-- 引入ExtJs樣式 -->
<link rel="stylesheet" type="text/css" href="<%=basePath %>static/ext-6.0.0.415/build/classic/theme-neptune/resources/theme-neptune-all.css">
<!-- 引入ExtJs核心Js -->
<script type="text/javascript" src="<%=basePath %>static/ext-6.0.0.415/ext-bootstrap.js"></script>
<script type="text/javascript" src="<%=basePath %>static/ext-6.0.0.415/build/ext-all.js"></script>
<script type="text/javascript" src="<%=basePath %>static/ext-6.0.0.415/build/classic/locale/locale-zh_CN.js"></script>
<!-- 頁面Js -->
<script type="text/javascript" src="<%=basePath %>static/js/helloWord.js"></script>
</head>
<body>
</body>
</html>
說明:
(1)Ext.onReady():ExtJS Application的入口...就相當於Java或C#的main函式.
(2)Ext.MessageBox.alert():彈出對話方塊。
相關文章
- PHP從零開始系列一(學習筆記):前言PHP筆記
- 從零搭建Spring Boot的Hello WorldSpring Boot
- ?從零開始學習webpack系列二(配置檔案)Web
- PHP從零開始系列二(學習筆記):序言PHP筆記
- 從零開始學習laravelLaravel
- 從零開始學習KafkaKafka
- 從同步函式 hello-world-dotnet 開始探索OpenFunction函式Function
- 從零開始學習機器學習機器學習
- 從零開始學Spring Boot系列-SpringApplicationSpring BootAPP
- React 學習之 Hello WorldReact
- ?從零開始學習webpack系列五(解析打包樣式)Web
- 【教程】如何從零開始構建深度學習專案?深度學習
- 從零開始學習開發人工智慧(一)人工智慧
- 從零開始機器學習機器學習
- python Scrapy 從零開始學習筆記(一)Python筆記
- 從零開始學Spring Boot系列-整合mybatisSpring BootMyBatis
- 從零開始學Spring Boot系列-整合MySQLSpring BootMySql
- 從零開始學Spring Boot系列-整合KafkaSpring BootKafka
- docker學習3:Docker Hello WorldDocker
- 從零開始機器學習-03機器學習
- 從零開始機器學習--4機器學習
- 從零開始機器學習--05機器學習
- 從零開始學習 Go ——安裝Go
- 從零開始學習C++(0)C++
- [系列] Go gRPC Hello WorldGoRPC
- 資料視覺化Seaborn從零開始學習教程(一) 風格選擇視覺化
- 從零開始學Spring Boot系列-外部化配置Spring Boot
- 《Python深度學習從零開始學》簡介Python深度學習
- 從零開始學習邏輯迴歸邏輯迴歸
- 從零開始學習如何部署程式碼
- 從零開始內網滲透學習內網
- 從零開始學習 React 高階元件React元件
- 從零開始學Electron筆記(一)筆記
- 從零開始學五筆(一):概述
- 好程式設計師Python教程從零開始學Python系列-第2講程式設計師Python
- 零基礎入門gRPC:從 0 實現一個Hello WorldRPC
- Flask教程第一章:Hello,World!Flask
- 從零開始學PythonPython
- Spring MVC 4.2.4 文件實踐(一)--- 菜鳥從零開始學系列SpringMVC