Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use javascript to make a pop-up box to choose a university?

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces "how to use javascript to make a pop-up frame for choosing a university". In daily operation, I believe many people have doubts about how to use javascript to make a pop-up frame for choosing a university. The editor consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful for everyone to answer the question of "how to use javascript to make a pop-up frame for choosing a university". Next, please follow the editor to study!

1. data

A total of 3049 universities across the country are copied from Renren (for learning and exchange only, not for commercial projects).

Data address: http://files.cnblogs.com/technology/school.js. This is a script file that contains a JSON object that stores information about the school in the format:

Var schoolList= [{"id": 1, / / Provincial id "school": [{"id": 1001, / / School id "name": "\ u6e05\ u534e\ u5927\ u5b66" / / School name} /. ], / / schools in this province "name": "\ u5317\ u4eac"}, / /.]

two。 Steps

2.1 the construction and ejection mode of the pop-up frame

At present, the pop-up box is divided into two forms: iframe and div. In this example, I choose to use div as the pop-up box. The structure of the pop-up box is as follows:

Choose a school

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report