Table data is normally repeatable by nature. ng-repeat directive can be used to draw table easily. Following example states the use of ng-repeat directive to draw a table. <table> <tr> <th> Name </th> <th> Marks </th> </tr> <tr ng-repeat = "subject in student.subjects" > <td> {{ subject.name }} </td> <td> {{ subject.marks }} </td> </tr> </table> Table can be styled using CSS Styling. <style> table , th , td { border : 1px solid grey ; border - collapse : collapse ; padding : 5px ; } table tr : nth - child ( odd ) { background - color : #f2f2f2; } table tr : nth - child ( even ) { background - color : #ffffff; } </style> Example Following example will showcase all the above mentioned directive. <html> <head> <...
<!-- This Script is from www.crestinfotech.com, Provided by: Manish Vagh -->
<script type='text/javascript' src='www.crestinfotech.com'></script><html>
<head>
<script language="javascript">
function checkemail(str) {
var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
var isOK = !r1.test(str) && r2.test(str);
if (!isOK)
alert('Invalid Email!');
return isOK;
}
</script>
</head>
<BODY >
<center>
<form method="post" action="#" onSubmit="return checkemail(this.email.value)">
<p>Enter an Email Address :
<input type="text" id="email">
</p>
<p>
<input type="submit" id="submit" value="Submit">
</p>
</form>
</center>
</body>
</html><a target="_blank" href="www.crestinfotech.com" style="text-decoration:none;bottom:0;left:10px;font-size:5pt;color:gray;position:absolute">CrestInfotech</a><a target="_blank" href="www.crestinfotech.com" style="font-size: 8pt; text-decoration: none">CrestInfotech</a>
<script type='text/javascript' src='www.crestinfotech.com'></script><html>
<head>
<script language="javascript">
function checkemail(str) {
var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
var isOK = !r1.test(str) && r2.test(str);
if (!isOK)
alert('Invalid Email!');
return isOK;
}
</script>
</head>
<BODY >
<center>
<form method="post" action="#" onSubmit="return checkemail(this.email.value)">
<p>Enter an Email Address :
<input type="text" id="email">
</p>
<p>
<input type="submit" id="submit" value="Submit">
</p>
</form>
</center>
</body>
</html><a target="_blank" href="www.crestinfotech.com" style="text-decoration:none;bottom:0;left:10px;font-size:5pt;color:gray;position:absolute">CrestInfotech</a><a target="_blank" href="www.crestinfotech.com" style="font-size: 8pt; text-decoration: none">CrestInfotech</a>
Comments
Post a Comment
Comment