Cov txheej txheem:

Vim li cas JQuery siv hauv asp net?
Vim li cas JQuery siv hauv asp net?

Video: Vim li cas JQuery siv hauv asp net?

Video: Vim li cas JQuery siv hauv asp net?
Video: 89TKTHN/ Vim Li Cas koj tso Yexus tseg/ Tus hu Nyaj Xuv Xyooj... 2024, Hlis ntuj nqeg
Anonim

JQuery yog ib lub tsev qiv ntawv JavaScript. Nws yog pab tau thiab ua kom yooj yim rau kev lis HTML DOM (Cov Ntaub Ntawv Hom Qauv), Cov Txheej Txheem thiab Animation thiab Ajax functionalities. JQuery txo cov lej piv rau JavaScript. Feem ntau peb siv JQuery lossis JavaScript rau cov neeg siv khoom sab nraud thiab ua rau Ajax hu rau ASP . NET Web form/mvc, Web service and WCF.

Ntxiv mus, jQuery siv rau dab tsi?

jQuery yog ib lub teeb yuag, "sau tsawg, ua ntau", JavaScript tsev qiv ntawv. Lub hom phiaj ntawm jQuery yog ua kom yooj yim dua rau siv JavaScript ntawm koj lub vev xaib. jQuery siv ntau txoj haujlwm uas xav tau ntau kab ntawm JavaScript code kom ua tiav, thiab qhwv lawv rau hauv txoj hauv kev uas koj tuaj yeem hu nrog ib kab ntawm cov lej.

Ib yam li ntawd, kev siv Ajax hauv asp net yog dab tsi? AJAX = Asynchronous JavaScript thiab XML. AJAX yog ib txoj hauv kev los tsim cov nplooj ntawv web sai thiab dynamic. AJAX tso cai rau cov nplooj ntawv web kom hloov kho asynchronously los ntawm kev sib pauv cov ntaub ntawv me me nrog cov neeg rau zaub mov tom qab. Qhov no txhais tau hais tias nws tuaj yeem hloov kho qhov chaw ntawm nplooj ntawv web, tsis tas yuav rov qab tag nrho nplooj ntawv.

Kuj paub, siv cov nplooj ntawv jQuery li cas hauv asp net?

Siv jQuery nrog ASP. NET Master Page

  1. Kauj ruam 1: Tsim ib tug Master Page (MasterPage. master) thiab ntxiv ib tug siv rau lub jQuery Library.
  2. Kauj ruam 2: Tam sim no tsim ib nplooj ntawv ntsiab lus hu ua 'Default. aspx' thiab ntxiv ob lub TextBox tswj rau nplooj ntawv no raws li qhia hauv qab no:
  3. Kauj ruam 3: Tam sim no nyob rau hauv lub 'Scripts' nplaub tshev, tsim ib tug textboxclone. js cov ntaub ntawv thiab ntxiv cov lej hauv qab no hauv nws.

Yuav ua li cas suav nrog jQuery hauv ASP NET MVC?

Peb kauj ruam siv jQuery UI hauv ASP. NET MVC 5

  1. Kauj ruam 1: Ntxiv cov jQuery UI siv. Ntxiv cov jQuery UI siv rau hauv qhov project siv tus thawj tswj NuGet.
  2. Kauj ruam 2: Bundle cov ntaub ntawv xav tau. Qhib BundleConfig.
  3. Kauj Ruam 3: Xa mus rau Bundles. Thaum cov pob khoom rau jQuery UI tau tsim, koj yuav tsum tau ntxiv lawv rau cov ntaub ntawv layout.

Pom zoo: