提交 d5a9c17c 编写于 作者: W wizardforcel

2022-01-28 22:48:38

上级 92eb7793
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
**HTML 基本结构:** **HTML 基本结构:**
``` ```html
<html> <html>
<head> <head>
<title> </title> <title> </title>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
假设我们必须为正文内容提供背景色。 假设我们必须为正文内容提供背景色。
``` ```html
<style type="text/css"> <style type="text/css">
body { body {
background-color: blue; background-color: blue;
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
我们把这个`style`标签放在`head`标签里。 我们把这个`style`标签放在`head`标签里。
``` ```html
<head> <head>
<style> <style>
//CSS Code //CSS Code
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
为此,请命名一个文件 **style.css** ,并在该文件中编写以下单独的 css 代码: 为此,请命名一个文件 **style.css** ,并在该文件中编写以下单独的 css 代码:
``` ```html
body{ body{
background-color: blue; background-color: blue;
} }
...@@ -66,7 +66,7 @@ body{ ...@@ -66,7 +66,7 @@ body{
**index.html** **index.html**
``` ```html
<head> <head>
<link rel="stylesheet" type="text/css" href="style.css"> <link rel="stylesheet" type="text/css" href="style.css">
</head> </head>
...@@ -82,7 +82,7 @@ body{ ...@@ -82,7 +82,7 @@ body{
假设我们必须注入一个字符串,比如说**我正在使用今晚学习**动态地学习我们的网页的`body` 假设我们必须注入一个字符串,比如说**我正在使用今晚学习**动态地学习我们的网页的`body`
``` ```html
<script type="text/javascript"> <script type="text/javascript">
document.getElementByTagName('body').innerHTML="I am learning using Studytonight"; document.getElementByTagName('body').innerHTML="I am learning using Studytonight";
</script> </script>
...@@ -90,7 +90,7 @@ body{ ...@@ -90,7 +90,7 @@ body{
我们可以将 javascript 代码放在`script`标签中,该标签放在`head`标签中。 我们可以将 javascript 代码放在`script`标签中,该标签放在`head`标签中。
``` ```html
<head> <head>
<script> <script>
//Javascript code //Javascript code
...@@ -102,7 +102,7 @@ body{ ...@@ -102,7 +102,7 @@ body{
**index.js** **index.js**
``` ```html
document.getElementByTagName('body').innerHTML="I am learning using Studytonight"; document.getElementByTagName('body').innerHTML="I am learning using Studytonight";
alert("I am learning Hybrid app development on Studytonight "); alert("I am learning Hybrid app development on Studytonight ");
prompt("What is your name?"); prompt("What is your name?");
...@@ -112,7 +112,7 @@ prompt("What is your name?"); ...@@ -112,7 +112,7 @@ prompt("What is your name?");
**index.html** **index.html**
``` ```html
<head> <head>
<script type="text/javascript" src="index.js"></script> <script type="text/javascript" src="index.js"></script>
</head> </head>
...@@ -128,13 +128,13 @@ prompt("What is your name?"); ...@@ -128,13 +128,13 @@ prompt("What is your name?");
**平面 Javascript 中的代码** **平面 Javascript 中的代码**
``` ```html
document.getElementById('test-div').innerHTML = "I am learning Hybrid App development on Studytonight"; document.getElementById('test-div').innerHTML = "I am learning Hybrid App development on Studytonight";
``` ```
**相同代码,使用 jQuery** **相同代码,使用 jQuery**
``` ```html
$('div').html("I am learning Hybrid App development on Studytonight"); $('div').html("I am learning Hybrid App development on Studytonight");
``` ```
...@@ -146,7 +146,7 @@ $('div').html("I am learning Hybrid App development on Studytonight"); ...@@ -146,7 +146,7 @@ $('div').html("I am learning Hybrid App development on Studytonight");
将它包含在您的 HTML 页面中,就像您添加了一个单独的 Javascript 文件并使用它一样。 将它包含在您的 HTML 页面中,就像您添加了一个单独的 Javascript 文件并使用它一样。
``` ```html
<head> <head>
<script type="text/javascript" src="library_name.js"></script> <script type="text/javascript" src="library_name.js"></script>
</head> </head>
...@@ -154,7 +154,7 @@ $('div').html("I am learning Hybrid App development on Studytonight"); ...@@ -154,7 +154,7 @@ $('div').html("I am learning Hybrid App development on Studytonight");
所以任何一个网页的最终结构都是这样的: 所以任何一个网页的最终结构都是这样的:
``` ```html
<html> <html>
<head> <head>
<script type="text/javascript" src="library_name.js"></script> //Any library jquery.js etc <script type="text/javascript" src="library_name.js"></script> //Any library jquery.js etc
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
我们的 <u>HTML</u> 文件:*index.html* 我们的 <u>HTML</u> 文件:*index.html*
``` ```html
<html> <html>
<head> <head>
<script type="text/javascript" src="index.js"></script> <script type="text/javascript" src="index.js"></script>
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
我们的 <u>CSS</u> 文件: *style.css* 我们的 <u>CSS</u> 文件: *style.css*
``` ```html
#question { #question {
margin-top:100px; margin-top:100px;
text-align:center; text-align:center;
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
我们的 <u>Javascript</u> 文件: *index.js* 我们的 <u>Javascript</u> 文件: *index.js*
``` ```html
function ask(){ function ask(){
// This function will be called when page will be loaded. // This function will be called when page will be loaded.
var k = prompt("Tell us your experience on Studytonight"); var k = prompt("Tell us your experience on Studytonight");
...@@ -111,7 +111,7 @@ function ask(){ ...@@ -111,7 +111,7 @@ function ask(){
2. 必需的插件。 2. 必需的插件。
3.*config.xml* 中,`content`标记用于指定要打开的第一页, 3.*config.xml* 中,`content`标记用于指定要打开的第一页,
``` ```html
<content src="index.html" /> <content src="index.html" />
``` ```
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
*<u>index.html</u>T3】* *<u>index.html</u>T3】*
``` ```html
<html> <html>
<head> <head>
<style type="text/css"> <style type="text/css">
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
3. 添加地理定位插件-键入`cordova plugin add cordova-plugin-geolcation`并按回车键。 3. 添加地理定位插件-键入`cordova plugin add cordova-plugin-geolcation`并按回车键。
4. 现在在您的*index.html*文件中编写以下代码,并将其放入项目文件夹中的 **www** 目录中。 4. 现在在您的*index.html*文件中编写以下代码,并将其放入项目文件夹中的 **www** 目录中。
``` ```html
<html> <html>
<head> <head>
<style type="text/css"> <style type="text/css">
......
...@@ -10,7 +10,7 @@ AJAX 代表**异步 Javascript 和 XML** 。它是一个客户端脚本,在 Ja ...@@ -10,7 +10,7 @@ AJAX 代表**异步 Javascript 和 XML** 。它是一个客户端脚本,在 Ja
`$.ajax`是一个 jQuery 函数,向服务器发出 http **POST****GET** 等请求并接收结果,无需刷新或重新加载页面。 `$.ajax`是一个 jQuery 函数,向服务器发出 http **POST****GET** 等请求并接收结果,无需刷新或重新加载页面。
``` ```html
$.ajax({ $.ajax({
type : 'get', //Request method: GET, POST type : 'get', //Request method: GET, POST
url : 'http://studytonight.php/login.php', //Where to send the data url : 'http://studytonight.php/login.php', //Where to send the data
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
*index.php* *index.php*
``` ```html
<?php <?php
echo "hello world!; echo "hello world!;
?> ?>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
4. Here is the `index.html` file. 4. Here is the `index.html` file.
``` ```html
<html> <html>
<head> <head>
<script type=”text/javascript” src=”*jquery.js*”></script> <script type=”text/javascript” src=”*jquery.js*”></script>
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
和`firstname.php` 和`firstname.php`
``` ```html
<?php <?php
$firstname = $_POST[‘firstname’]; $firstname = $_POST[‘firstname’];
$lastname = $_POST[‘lastname’]; $lastname = $_POST[‘lastname’];
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
3. 在文本区域键入以下命令,然后单击开始。 3. 在文本区域键入以下命令,然后单击开始。
``` ```html
CREATE DATABASE mydb; CREATE DATABASE mydb;
``` ```
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
4. 现在打开 **mydb** 数据库,在边栏中点击它,然后再次点击 SQL。然后使用以下命令创建表格。 4. 现在打开 **mydb** 数据库,在边栏中点击它,然后再次点击 SQL。然后使用以下命令创建表格。
``` ```html
CREATE TABLE my_table ( CREATE TABLE my_table (
id int AUTO_INCREMENT, id int AUTO_INCREMENT,
firstname varchar(200), firstname varchar(200),
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
**firstname.php** **firstname.php**
``` ```html
<?php <?php
/* /*
localhost is the location where the server is located localhost is the location where the server is located
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册