You are on page 1of 2

<%--

Document : sss
Created on : Mar 28, 2014, 2:51:50 PM
Author : t_saad
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
<title>jQuery UI Datepicker - Default functionality</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquer
y-ui.css">
<script src="//code.jquery.com/jquery-1.9.1.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<script>
$(function() {
$( "#datepicker" ).datepicker();
});
function addHTML(){
var txt = "saad@chirag@hitesh";
txt = txt.split("@");
var demo = document.getElementById("demo");
demo.innerHTML = "<input type='text' value='Hello'/>";
demo.innerHTML += "<select id=''><option>"+txt[0]+"</option><option>"+txt[1]
+"</option><option>"+txt[2]+"</option></select>"
}
var caltxt = "<script type='text/javascript'>"
caltxt += "Calendar.setup({";
caltxt += "\ninputField : " + id + ",";
caltxt += "\nifFormat : '%d.%m.%Y %H:%M',"; // format of the inp
ut field
caltxt += "\nshowsTime : true,";
caltxt += "\nalign : 'Bl',"; // alignment (def
aults to "Bl")
caltxt += "\nsingleClick : true";
caltxt += "});"
caltxt += "< /script>";
temp_td.appendChild(d_scr);
var d_img = document.createElement("img");
var d_img_name = "d_img" + c_index + tt;
d_img.setAttribute("src", "images/cal.gif");
d_img.setAttribute("name", d_img_name);
d_img.setAttribute("id", d_img_name);
d_img.setAttribute("width", "25");
d_img.setAttribute("height", "20");
d_img.setAttribute("border", "0");
d_img.setAttribute("alt", "date");
d_img.setAttribute("style", "cursor: pointer;");
function addtblrow(){
var txt = "<td><input type='text' value='cell1'/><img>"+caltxt+"</td><td><select
id=''><option>1</option><option>2</option><option>3</option></select></td><td><
input type='button' value='ADD'/></td>"
document.getElementById("tbl").innerHTML += txt;
}
</script>
</head>
<body>
<h1>Hello World!</h1>
<%
String str = "SAad merchant";
//if(str.matches("[a-zA-Z.]*")){

if(str.matches("[a-zA-Z0-9 /-]*")){
out.println("S");
}else{
out.println("F");
}
%>
<p>Date: <input type="text" id="datepicker"></p>
<div id="demo"></div>
<table id="tbl">
<tr>
<td>cell1</td>
<td>cell2</td>
<td>cell3</td>
</tr>
</table>
<input type="button" onclick="addtblrow()" value="click"/>
</body>
</html>

You might also like