私は 7-8 でいくつかの html5 コンテンツを使用しようとしています。そのために Modernizr を使用していますが、今のところ機能していません。
フォーム入力を検証するために必要なパターンを使用したい (かなり :))。
私のjsp:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="js/html5shiv.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Ask email</title>
<link rel="stylesheet" type="text/css"
href="<%=request.getContextPath()%>/css/portail.css" />
</head>
<body>
<jsp:include page="header.jsp" />
<form:form method="POST" action="/it-portail/createdLink.mvc">
<table class="requestEmail">
<tr>
<td><label for="email">Email:</label></td>
<td><input type='email' required
pattern=".*@blabla\.fr|.*@toto\.com"
x-moz-errormessage="Entrer votre email (blabla.fr ou toto.com)"
name="email" id="email" class="inputText" size="35" maxlength="49"
value="" /></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Submit" /></td>
</tr>
</table>
</form:form>
</body>
</html>
私alert('test')
はjsスクリプトを入れて、それを印刷しました。(.js は正しくリンクされています)
Firefoxで動作しています。
何か案が ?