2018-09-15_JSON

JSON APIS and AJAX

  • Description:
    *Introduction to the JSON APIs and AJAX Challenges

    1. Similar to how User Interfaces help people use programs, Application Programming Interfaces (APIs) help programs interact with other programs. APIs are tools that computers use to communicate with one another, in part to send and receive data. You can use API functionality in your page once you understand how to make requests and process data from it. Programmers often use AJAX technologies when working with APIs.

    2. The term AJAX originated as an acronym for Asynchronous JavaScript And XML. It refers to a group of technologies that make asynchronous requests to a server to transfer data, then load any returned data into the page. An asynchronous process has a couple key properties. The browser does not stop loading a page to wait for the server's response. Also, the browser inserts updated data into part of the page without having to refresh the entire page.

    3. User experience benefits from asynchronous processes in several ways. ①Pages load faster since the browser isn't waiting for the server to respond in the middle of a page render. ②Requests and transfers happen in the background, without interrupting what the user is doing. ③When the browser receives new data, only the necessary area of the page refreshes. These qualities especially enhance the user experience for single page applications.

    4. The data transferred between the browser and server is often in a format called JavaScript Object Notation (JSON). JSON resembles JavaScript object literal syntax, except that it's transferred as a string. Once received, it can be converted into an object and used in a script.

    5. This section covers how to transfer and use data using AJAX technologies with a freeCodeCamp API.


1. Handle Click Events with JavaScript using the onclick property

  • Description:

    • You want your code to execute only once your page has finished loading. For that purpose, you can attach a JavaScript event to the document called DOMContentLoaded. Here's the code that does this:
      您希望只在頁(yè)面加載完成后才執(zhí)行代碼。為此寨典,可以將JavaScript事件附加到名為DOMContentLoaded的文檔。下面是這樣做的代碼:

      document.addEventListener('DOMContentLoaded',function() {
        //your code
      });
      
    • You can implement event handlers that go inside of the DOMContentLoaded function. You can implement an onclick event handler which triggers when the user clicks on the element with id getMessage, by adding the following code:

      document.getElementById('getMessage').onclick=function(){};

  • Demand:
    Add a click event handler inside of the DOMContentLoaded function for the element with id of getMessage.

  • Sample Code:

      <script>
        document.addEventListener('DOMContentLoaded',function(){
          // Add your code below this line
          document.getElementById("getMessage").onclick = function() {
            alert("hello world");
          };
          // Add your code above this line
        });
      </script>
      <style>
        body {
          text-align: center;
          font-family: "Helvetica", sans-serif;
        }
        h1 {
          font-size: 2em;
          font-weight: bold;
        }
        .box {
          border-radius: 5px;
          background-color: #eee;
          padding: 20px 5px;
        }
        button {
          color: white;
          background-color: #4791d0;
          border-radius: 5px;
          border: 1px solid #4791d0;
          padding: 5px 10px 8px 10px;
        }
          button:hover {
          background-color: #0F5897;
          border: 1px solid #0F5897;
        }
      </style>
      <h1>Cat Photo Finder</h1> 
      <p class="message box">
        The message will go here
      </p>
      <p>
        <button id="getMessage">
          Get Message
        </button>
      </p>
    


2. Change Text with click Events

  • Description:

    • When the click event happens, you can use JavaScript to update an HTML element.

    • For example, when a user clicks the "Get Message" button, it changes the text of the element with the class message to say "Here is the message".

    • This works by adding the following code within the click event:

      document.getElementsByClassName('message')[0].textContent="Here is the message";
      
  • Demand:
    Add code inside the onclick event handler to change the text inside the message element to say "Here is the message".

  • Sample Code:

      <script>
        document.addEventListener('DOMContentLoaded',function(){
          document.getElementById('getMessage').onclick=function(){
            // Add your code below this line
            document.getElementsByClassName("message")[0].textContent="Here is the message";
    
            // Add your code above this line
          }
        });
      </script>
      <style>
        body {
          text-align: center;
          font-family: "Helvetica", sans-serif;
        }
        h1 {
          font-size: 2em;
          font-weight: bold;
        }
        .box {
          border-radius: 5px;
          background-color: #eee;
          padding: 20px 5px;
        }
        button {
          color: white;
          background-color: #4791d0;
          border-radius: 5px;
          border: 1px solid #4791d0;
          padding: 5px 10px 8px 10px;
        }
        button:hover {
          background-color: #0F5897;
          border: 1px solid #0F5897;
        }
      </style>
      <h1>Cat Photo Finder</h1> 
      <p class="message box">
        The message will go here
      </p>
      <p>
        <button id="getMessage">
          Get Message
        </button>
      </p>
    


3. Get JSON with the JavaScript XMLHttpRequest Method

  • Description:

    • API

      1. You can also request data from an external source. This is where APIs come into play.

      2. Remember that APIs - or Application Programming Interfaces - are tools that computers use to communicate with one another. You'll learn how to update HTML with the data we get from APIs using a technology called AJAX.

    • JSON

      1. Most web APIs transfer data in a format called JSON. JSON stands for JavaScript Object Notation.

      2. JSON syntax looks very similar to JavaScript object literal notation. JSON has object properties and their current values, sandwiched between a { and a }.

      3. These properties and their values are often referred to as "key-value pairs".

      4. However, JSON transmitted by APIs are sent as bytes, and your application receives it as a string. These can be converted into JavaScript objects, but they are not JavaScript objects by default. The JSON.parse method parses the string and constructs the JavaScript object described by it.

  • Explain:

    • You can request the JSON from freeCodeCamp's Cat Photo API. Here's the code you can put in your click event to do this:

      req=new XMLHttpRequest();
      req.open("GET",'/json/cats.json',true);
      req.send();
      req.onload=function(){
        json=JSON.parse(req.responseText);
        document.getElementsByClassName('message')[0].innerHTML=JSON.stringify(json);
      };
      
    1. Here's a review of what each piece is doing. The JavaScript XMLHttpRequest object has a number of properties and methods that are used to transfer data. First, an instance of the XMLHttpRequest object is created and saved in the req variable.
      下面是對(duì)每一部分的回顧。JavaScript XMLHttpRequest對(duì)象有許多用于傳輸數(shù)據(jù)的屬性和方法。首先,在req變量中創(chuàng)建和保存XMLHttpRequest對(duì)象的實(shí)例矛物。

    2. Next, the open method initializes a request - this example is requesting data from an API, therefore is a "GET" request. The second argument for open is the URL of the API you are requesting data from. The third argument is a Boolean value where true makes it an asynchronous request.
      接下來(lái)屉来,open方法初始化一個(gè)請(qǐng)求——這個(gè)示例從API請(qǐng)求數(shù)據(jù)路翻,因此是一個(gè)“GET”請(qǐng)求。open的第二個(gè)參數(shù)是請(qǐng)求數(shù)據(jù)的API的URL茄靠。第三個(gè)參數(shù)是布爾值茂契,true表示異步請(qǐng)求。

    3. The send method sends the request. Finally, the onload event handler parses the returned data and applies the JSON.stringify method to convert the JavaScript object into a string. This string is then inserted as the message text.
      send方法發(fā)送請(qǐng)求慨绳。最后掉冶,onload事件處理程序解析返回的數(shù)據(jù)并應(yīng)用JSON.stringify方法將JavaScript對(duì)象轉(zhuǎn)換為字符串。然后這個(gè)字符串作為消息文本插入脐雪。

  • Demand:
    Update the code to create and send a "GET" request to the freeCodeCamp Cat Photo API. Then click the "Get Message" button. Your AJAX function will replace the "The message will go here" text with the raw JSON output from the API.

  • Sample Code:

        <script>
        document.addEventListener('DOMContentLoaded',function(){
          document.getElementById('getMessage').onclick=function(){
            // Add your code below this line
            const req = new XMLHttpRequest();
            req.open("GET", "/json/cats.json", true);
            req.send();
            req.onload=function() {
              json = JSON.parse(req.responseText),
              document.getElementsByClassName("message")[0].innerHTML=JSON.stringify(json);
            }
    
            // Add your code above this line
          };
        });
      </script>
      <style>
        body {
          text-align: center;
          font-family: "Helvetica", sans-serif;
        }
        h1 {
          font-size: 2em;
          font-weight: bold;
        }
        .box {
          border-radius: 5px;
          background-color: #eee;
          padding: 20px 5px;
        }
        button {
          color: white;
          background-color: #4791d0;
          border-radius: 5px;
          border: 1px solid #4791d0;
          padding: 5px 10px 8px 10px;
        }
        button:hover {
          background-color: #0F5897;
          border: 1px solid #0F5897;
        }
      </style>
      <h1>Cat Photo Finder</h1> 
      <p class="message box">
        The message will go here
      </p>
      <p>
        <button id="getMessage">
          Get Message
        </button>
      </p>
    


4. Access the JSON Data from an API

  • Description:

    • In the previous challenge, you saw how to get JSON data from the freeCodeCamp Cat Photo API.

    • Now you'll take a closer look at the returned data to better understand the JSON format. Recall some notation in JavaScript:

      [ ] -> Square brackets represent an array
      { } -> Curly brackets represent an object
      " " -> Double quotes represent a string. 
          -> They are also used for key names in JSON
      
    • Understanding the structure of the data that an API returns is important because it influences how you retrieve the values you need.

    • On the right, click the "Get Message" button to load the freeCodeCamp Cat Photo API JSON into the HTML.

    • The first and last character you see in the JSON data are square brackets [ ]. This means that the returned data is an array. The second character in the JSON data is a curly { bracket, which starts an object. Looking closely, you can see that there are three separate objects. The JSON data is an array of three objects, where each object contains information about a cat photo.
      JSON數(shù)據(jù)中的第一個(gè)和最后一個(gè)字符是方括號(hào)[]厌小。這意味著返回的數(shù)據(jù)是一個(gè)數(shù)組。JSON數(shù)據(jù)中的第二個(gè)字符是一個(gè)花括號(hào)战秋,它啟動(dòng)一個(gè)對(duì)象璧亚。仔細(xì)觀察,你會(huì)發(fā)現(xiàn)有三個(gè)獨(dú)立的對(duì)象脂信。JSON數(shù)據(jù)是一個(gè)包含三個(gè)對(duì)象的數(shù)組癣蟋,每個(gè)對(duì)象都包含關(guān)于cat照片的信息。

    • You learned earlier that objects contain "key-value pairs" that are separated by commas. In the Cat Photo example, the first object has "id":0 where "id" is a key and 0 is its corresponding value. Similarly, there are keys for "imageLink", "altText", and "codeNames". Each cat photo object has these same keys, but with different values.
      您在前面了解到狰闪,對(duì)象包含由逗號(hào)分隔的“鍵-值對(duì)”疯搅。在Cat Photo示例中,第一個(gè)對(duì)象有“id”:0埋泵,其中“id”是鍵幔欧,0是對(duì)應(yīng)的值。類(lèi)似地,還有“imageLink”琐馆、“altText”和“codeNames”的鍵规阀。每個(gè)cat photo對(duì)象都有相同的鍵,但是值不同瘦麸。

    • Another interesting "key-value pair" in the first object is "codeNames":["Juggernaut","Mrs. Wallace","ButterCup"]. Here "codeNames" is the key and its value is an array of three strings. It's possible to have arrays of objects as well as a key with an array as a value.

    • Remember how to access data in arrays and objects. Arrays use bracket notation to access a specific index of an item. Objects use either bracket or dot notation to access the value of a given property. Here's an example that prints the "altText" of the first cat photo - note that the parsed JSON data in the editor is saved in a variable called json:

      console.log(json[0].altText);
      // Prints "A white cat wearing a green helmet shaped melon on its head."
      
  • Demand:
    For the cat with the "id" of 2, print to the console the second value in the codeNames array. You should use bracket and dot notation on the object (which is saved in the variable json) to access the value.

  • Sample Code:

    <script>
        document.addEventListener('DOMContentLoaded',function(){
          document.getElementById('getMessage').onclick=function(){
            req=new XMLHttpRequest();
            req.open("GET",'/json/cats.json',true);
            req.send();
            req.onload=function(){
              json=JSON.parse(req.responseText);
              document.getElementsByClassName('message')[0].innerHTML=JSON.stringify(json);
              // Add your code below this line
              console.log(json[2].codeNames[1]);
    
              // Add your code above this line
            };
          };
        });
      </script>
      <style>
        body {
          text-align: center;
          font-family: "Helvetica", sans-serif;
        }
        h1 {
          font-size: 2em;
          font-weight: bold;
        }
        .box {
          border-radius: 5px;
          background-color: #eee;
          padding: 20px 5px;
        }
        button {
          color: white;
          background-color: #4791d0;
          border-radius: 5px;
          border: 1px solid #4791d0;
          padding: 5px 10px 8px 10px;
        }
        button:hover {
          background-color: #0F5897;
          border: 1px solid #0F5897;
        }
      </style>
      <h1>Cat Photo Finder</h1> 
      <p class="message box">
        The message will go here
      </p>
      <p>
        <button id="getMessage">
          Get Message
        </button>
      </p>
    


5. Convert JSON Data to HTML

  • Description:

    • Now that you're getting data from a JSON API, you can display it in the HTML.

    • You can use a forEach method to loop through the data since the cat photo objects are held in an array. As you get to each item, you can modify the HTML elements.

      1. First, declare an html variable with var html = "";.

      2. Then, loop through the JSON, adding HTML to the variable that wraps the key names in strong tags, followed by the value. When the loop is finished, you render it.

    • Here's the code that does this:

      json.forEach(function(val) {
        var keys = Object.keys(val);
        html += "<div class = 'cat'>";
        keys.forEach(function(key) {
          html += "<strong>" + key + "</strong>: " + val[key] + "<br>";
        });
        html += "</div><br>";
      });
      
    • Add a forEach method to loop over the JSON data and create the HTML elements to display it.

    • Here is some example JSON

      [
        {
          "id":0,
            "imageLink":"https://s3.amazonaws.com/freecodecamp/funny-cat.jpg",
            "altText":"A white cat wearing a green helmet shaped melon on its head. ",
            "codeNames":[ "Juggernaut", "Mrs. Wallace", "Buttercup"
          ]
        }
      ] 
      
  • Sample Code:

    <script>
        document.addEventListener('DOMContentLoaded',function(){
          document.getElementById('getMessage').onclick=function(){
            req=new XMLHttpRequest();
            req.open("GET",'/json/cats.json',true);
            req.send();
            req.onload=function(){
              json=JSON.parse(req.responseText);
              var html = "";
              // Add your code below this line
              json.forEach(function(val) {
                var keys = Object.keys(val);
                html += "<div class='cat'>";
                keys.forEach(function(key) {
                  html += "<strong>" + key + "</strong>: " + val[key] + "<br/>";
                });
                html += "</div><br>"
              });
              // Add your code above this line
              document.getElementsByClassName('message')[0].innerHTML=html;
            };
          };
        });
      </script>
      <style>
        body {
          text-align: center;
          font-family: "Helvetica", sans-serif;
        }
        h1 {
          font-size: 2em;
          font-weight: bold;
        }
        .box {
          border-radius: 5px;
          background-color: #eee;
          padding: 20px 5px;
        }
        button {
          color: white;
          background-color: #4791d0;
          border-radius: 5px;
          border: 1px solid #4791d0;
          padding: 5px 10px 8px 10px;
        }
        button:hover {
          background-color: #0F5897;
          border: 1px solid #0F5897;
        }
      </style>
      <h1>Cat Photo Finder</h1> 
      <p class="message box">
        The message will go here
      </p>
      <p>
        <button id="getMessage">
          Get Message
        </button>
      </p>
    


6. Render Images from Data Sources

  • Description:

    • The last few challenges showed that each object in the JSON array contains an imageLink key with a value that is the URL of a cat's image.

    • When you're looping through these objects, you can use this imageLink property to display this image in an img element.

    • Here's the code that does this:

      html += "<img src = '" + val.imageLink + "' " + "alt='" + val.altText + "'>";
      
  • Demanda:
    Add code to use the imageLink and altText properties in an img tag.

  • Sample Code:

      <script>
        document.addEventListener('DOMContentLoaded',function(){
          document.getElementById('getMessage').onclick=function(){
            req=new XMLHttpRequest();
            req.open("GET",'/json/cats.json',true);
            req.send();
            req.onload=function(){
              json=JSON.parse(req.responseText);
              var html = "";
              json.forEach(function(val) {
                html += "<div class = 'cat'>";
                // Add your code below this line
                html += "<img src='" + val.imageLink + "' " + "alt='" + val.altText + "'>"
    
                // Add your code above this line
                html += "</div><br>";
              });
              document.getElementsByClassName('message')[0].innerHTML=html;
            };
           };
        });
      </script>
      <style>
        body {
          text-align: center;
          font-family: "Helvetica", sans-serif;
        }
        h1 {
          font-size: 2em;
          font-weight: bold;
        }
        .box {
          border-radius: 5px;
          background-color: #eee;
          padding: 20px 5px;
        }
        button {
          color: white;
          background-color: #4791d0;
          border-radius: 5px;
          border: 1px solid #4791d0;
          padding: 5px 10px 8px 10px;
        }
        button:hover {
          background-color: #0F5897;
          border: 1px solid #0F5897;
        }
      </style>
      <h1>Cat Photo Finder</h1> 
      <p class="message box">
        The message will go here
      </p>
      <p>
        <button id="getMessage">
          Get Message
        </button>
      </p>
    


7. Pre-filter JSON to Get the Data You Need

  • Description:

    • If you don't want to render every cat photo you get from the freeCodeCamp Cat Photo API, you can pre-filter the JSON before looping through it.

    • Given that the JSON data is stored in an array, you can use the filter method to filter out the cat whose "id" key has a value of 1.

    • Here's the code to do this:

      json = json.filter(function(val) {
        return (val.id !== 1);
      });
      
  • Demand:
    Add code to filter the json data to remove the cat with the "id" value of 1.

  • Sample Code:

      <script>
            document.addEventListener('DOMContentLoaded',function(){
              document.getElementById('getMessage').onclick=function(){
                req=new XMLHttpRequest();
                req.open("GET",'/json/cats.json',true);
                req.send();
                req.onload=function(){
                  json=JSON.parse(req.responseText);
                  var html = "";
                  // Add your code below this line
                  json = json.filter((val) => json.id !== 1)
    
                  // Add your code above this line
                   json.forEach(function(val) {
                     html += "<div class = 'cat'>"
    
                     html += "<img src = '" + val.imageLink + "' " + "alt='" + val.altText + "'>"
    
                     html += "</div>"
                   });
                   document.getElementsByClassName('message')[0].innerHTML=html;
                 };
               }; 
            });
          </script>
          <style>
            body {
              text-align: center;
              font-family: "Helvetica", sans-serif;
            }
            h1 {
              font-size: 2em;
              font-weight: bold;
            }
            .box {
              border-radius: 5px;
              background-color: #eee;
              padding: 20px 5px;
            }
            button {
              color: white;
              background-color: #4791d0;
              border-radius: 5px;
              border: 1px solid #4791d0;
              padding: 5px 10px 8px 10px;
            }
            button:hover {
              background-color: #0F5897;
              border: 1px solid #0F5897;
            }
          </style>
          <h1>Cat Photo Finder</h1> 
          <p class="message box">
            The message will go here
          </p>
          <p>
            <button id="getMessage">
              Get Message
            </button>
          </p>
    


8. Get Geolocation Data to Find A User's GPS Coordinates

(獲取地理位置數(shù)據(jù)以找到用戶的GPS坐標(biāo))

  • Description:

    • Another cool thing you can do is access your user's current location. Every browser has a built in navigator that can give you this information.

    • The navigator will get the user's current longitude and latitude.

    • You will see a prompt to allow or block this site from knowing your current location. The challenge can be completed either way, as long as the code is correct.

    • By selecting allow, you will see the text on the output phone change to your latitude and longitude.

    • Here's code that does this:

      if (navigator.geolocation){
        navigator.geolocation.getCurrentPosition(function(position) {
          document.getElementById('data').innerHTML="latitude: "+ position.coords.latitude + "<br>longitude: " + position.coords.longitude;
        });
      }
      
    • First, it checks if the navigator.geolocation object exists. If it does, the getCurrentPosition method on that object is called, which initiates an asynchronous request for the user's position. If the request is successful, the callback function in the method runs. This function accesses the position object's values for latitude and longitude using dot notation and updates the HTML.

  • Demand:
    Add the example code inside the script tags to check a user's current location and insert it into the HTML.

  • Sample Code:

      <script>
        // Add your code below this line
        if(navigator.geolocation) {
          navigator.geolocation.getCurrentPosition(function(position){
            let html = "";
            document.getElementById("data").innerHTML = "latitude: " + position.coords.latitude + "<br>longitude: " + position.coords.longitude;
          });
        }
    
        // Add your code above this line
      </script>
      <h4>You are here:</h4>
      <div id="data">
    
      </div>
    


9. Post Data with the JavaScript XMLHttpRequest Method

  • Description:

    • In the previous examples, you received data from an external resource. You can also send data to an external resource, as long as that resource supports AJAX requests and you know the URL.

    • JavaScript's XMLHttpRequest method is also used to post data to a server. Here's an example:

      req=new XMLHttpRequest();
      req.open("POST",url,true);
      req.setRequestHeader('Content-Type','text/plain');
      req.onreadystatechange=function(){
        if(req.readyState==4 && req.status==200){
          document.getElementsByClassName('message')[0].innerHTML=req.responseText;
        }
      };
      req.send(userName);
      
    • You've seen several of these methods before. Here the open method initializes the request as a "POST" to the given URL of the external resource, and uses the true Boolean to make it asynchronous.

    • The setRequestHeader method sets the value of an HTTP request header, which contains information about the sender and the request. It must be called after the open method, but before the send method. The two parameters are the name of the header and the value to set as the body of that header.

    • Next, the onreadystatechange event listener handles a change in the state of the request. A readyState of 4 means the operation is complete, and a status of 200 means it was a successful request. The document's HTML can be updated.

    • Finally, the send method sends the request with the userName value, which was given by the user in the input field.

  • Demand:
    Update the code to create and send a "POST" request. Then enter your name in input box and click "Send Message". Your AJAX function will replace "Reply from Server will be here." with the reply of the server. In this case, it is your name appended with " loves cats".

  • Sample Code:

      <script>
        document.addEventListener('DOMContentLoaded',function(){
          document.getElementById('sendMessage').onclick=function(){
    
            var userName=document.getElementById('name').value;
            // Add your code below this line
            let req = new XMLHttpRequest();
            req.open("POST", url, true);
            req.setRequestHeader("Content-Type", "text/plain");
            req.onreadystatechange = function() {
              if(req.readyState == 4 && req.status == 200) {
                document.getElementsByClassName("message")[0].innerHTML = req.responseText;
              }
              req.send(userName);
            }
    
            // Add your code above this line
          };
        });
      </script>
      <style>
        body {
          text-align: center;
          font-family: "Helvetica", sans-serif;
        }
        h1 {
          font-size: 2em;
          font-weight: bold;
        }
        .box {
          border-radius: 5px;
          background-color: #eee;
          padding: 20px 5px;
        }
        button {
          color: white;
          background-color: #4791d0;
          border-radius: 5px;
          border: 1px solid #4791d0;
          padding: 5px 10px 8px 10px;
        }
        button:hover {
          background-color: #0F5897;
          border: 1px solid #0F5897;
        }
      </style>
      <h1>Cat Friends</h1> 
      <p class="message box">
        Reply from Server will be here
      </p>
      <p>
        <label for="name">Your name:
          <input type="text" id="name"/>
        </label>
        <button id="sendMessage">
          Send Message
        </button>
      </p>
    
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末谁撼,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子滋饲,更是在濱河造成了極大的恐慌厉碟,老刑警劉巖,帶你破解...
    沈念sama閱讀 206,723評(píng)論 6 481
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件屠缭,死亡現(xiàn)場(chǎng)離奇詭異箍鼓,居然都是意外死亡,警方通過(guò)查閱死者的電腦和手機(jī)呵曹,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 88,485評(píng)論 2 382
  • 文/潘曉璐 我一進(jìn)店門(mén)款咖,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái),“玉大人奄喂,你說(shuō)我怎么就攤上這事铐殃。” “怎么了跨新?”我有些...
    開(kāi)封第一講書(shū)人閱讀 152,998評(píng)論 0 344
  • 文/不壞的土叔 我叫張陵富腊,是天一觀的道長(zhǎng)。 經(jīng)常有香客問(wèn)我域帐,道長(zhǎng)赘被,這世上最難降的妖魔是什么? 我笑而不...
    開(kāi)封第一講書(shū)人閱讀 55,323評(píng)論 1 279
  • 正文 為了忘掉前任肖揣,我火速辦了婚禮民假,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘龙优。我一直安慰自己阳欲,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 64,355評(píng)論 5 374
  • 文/花漫 我一把揭開(kāi)白布陋率。 她就那樣靜靜地躺著,像睡著了一般秽晚。 火紅的嫁衣襯著肌膚如雪瓦糟。 梳的紋絲不亂的頭發(fā)上,一...
    開(kāi)封第一講書(shū)人閱讀 49,079評(píng)論 1 285
  • 那天赴蝇,我揣著相機(jī)與錄音,去河邊找鬼。 笑死淆九,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的陆淀。 我是一名探鬼主播,決...
    沈念sama閱讀 38,389評(píng)論 3 400
  • 文/蒼蘭香墨 我猛地睜開(kāi)眼先嬉,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼轧苫!你這毒婦竟也來(lái)了?” 一聲冷哼從身側(cè)響起疫蔓,我...
    開(kāi)封第一講書(shū)人閱讀 37,019評(píng)論 0 259
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤含懊,失蹤者是張志新(化名)和其女友劉穎,沒(méi)想到半個(gè)月后衅胀,有當(dāng)?shù)厝嗽跇?shù)林里發(fā)現(xiàn)了一具尸體岔乔,經(jīng)...
    沈念sama閱讀 43,519評(píng)論 1 300
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 35,971評(píng)論 2 325
  • 正文 我和宋清朗相戀三年滚躯,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了雏门。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 38,100評(píng)論 1 333
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡掸掏,死狀恐怖茁影,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情阅束,我是刑警寧澤呼胚,帶...
    沈念sama閱讀 33,738評(píng)論 4 324
  • 正文 年R本政府宣布,位于F島的核電站息裸,受9級(jí)特大地震影響蝇更,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜呼盆,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 39,293評(píng)論 3 307
  • 文/蒙蒙 一年扩、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧访圃,春花似錦厨幻、人聲如沸。這莊子的主人今日做“春日...
    開(kāi)封第一講書(shū)人閱讀 30,289評(píng)論 0 19
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)。三九已至批糟,卻和暖如春格了,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背徽鼎。 一陣腳步聲響...
    開(kāi)封第一講書(shū)人閱讀 31,517評(píng)論 1 262
  • 我被黑心中介騙來(lái)泰國(guó)打工盛末, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留弹惦,地道東北人。 一個(gè)月前我還...
    沈念sama閱讀 45,547評(píng)論 2 354
  • 正文 我出身青樓悄但,卻偏偏與公主長(zhǎng)得像棠隐,于是被迫代替她去往敵國(guó)和親。 傳聞我的和親對(duì)象是個(gè)殘疾皇子檐嚣,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 42,834評(píng)論 2 345

推薦閱讀更多精彩內(nèi)容