Cursos / Informática para Internet / Desenvolvimento Web II / Aula

arrow_back Aula 12 - Adotando o jQuery no Sistema da Livraria

Incluindo as referências do jQuery (padrão e UI)

O primeiro passo para se utilizar jQuery é incluir as suas bibliotecas. Para isso, podemos fazer uso do arquivo cabecalho.jspf, pois ele já é incluído, automaticamente, em praticamente todos as páginas do sistema.

A seguir, veremos o código do arquivo cabecalho.jsp, que agora está incluindo as bibliotecas do jQuery (linhas 08 a 10):

x
1
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
2
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
3
<html>
4
    <head>
5
        <title>
6
            Minha Livraria Virtual
7
        </title>
8
        <script type="text/javascript" src="http://code.jquery.com/jquery-2.1.3.js"></script>
9
        <script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"></script>
10
        <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"/>
11
    </head>
12
13
    <body bgcolor="#FFFFFF">
14
        <center>
15
            <hr>
16
            <br>
17
            <h1>
18
                <img width="50" src="/livraria/imagem/livro.png">
19
                <font size="+3">Minha Livraria Virtual</font>
20
                <img width="50" src="/livraria/imagem/livro.png">
21
            </h1>
22
        </center>
23
24
            <br>
25
            <hr>

Versão 5.3 - Todos os Direitos reservados