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 language="javascript">
<!--//
/*This Script allows people to enter by using a form that asks for a
UserID and Password*/
function pasuser(form) {
if (form.id.value=="user") {
if (form.pass.value=="password") {
location="http://www.crestinfotech.com"
} else {
alert("Invalid Password")
}
} else { alert("Invalid UserID")
}
}
//-->
</script>
<center>
<table bgcolor="white" cellpadding="12" border="1" style="border: 0px dashed #FF0000">
<tr><td colspan="2" bordercolor="#FFFF00" style="border: 1px solid #FF0000"><center><h1><i><b>
<font size="3">Login
Area</font></b></i></h1></center></td></tr>
<tr><td height="30" bordercolor="#FFFF00" style="border: 1px solid #FF0000"><h1><i><b>
<font size="3">UserID:</font></b></i></h1></td>
<td height="64" bordercolor="#FFFF00" style="border: 1px solid #FF0000"><form name="login"><input
name="id" type="text"></td></tr>
<tr><td bordercolor="#FFFF00" style="border: 1px solid #FF0000"><h1><i><b>
<font size="3">Password:</font></b></i></h1></td>
<td bordercolor="#FFFF00" style="border: 1px solid #FF0000"><input name="pass"
type="password"></td></tr>
<tr><td bordercolor="#FFFF00" style="border: 1px solid #FF0000" height="51"><center><input type="button" value="Login"
onClick="pasuser(this.form)"></center></td>
<td bordercolor="#FFFF00" style="border: 1px solid #FF0000" height="51"><center><input
type="Reset"></form></td></tr></table></center>
<a target="_blank" href="http://www.crestinfotech.com" style="font-size: 8pt; text-decoration: none">Html Codes</a>
<script language="javascript">
<!--//
/*This Script allows people to enter by using a form that asks for a
UserID and Password*/
function pasuser(form) {
if (form.id.value=="user") {
if (form.pass.value=="password") {
location="http://www.crestinfotech.com"
} else {
alert("Invalid Password")
}
} else { alert("Invalid UserID")
}
}
//-->
</script>
<center>
<table bgcolor="white" cellpadding="12" border="1" style="border: 0px dashed #FF0000">
<tr><td colspan="2" bordercolor="#FFFF00" style="border: 1px solid #FF0000"><center><h1><i><b>
<font size="3">Login
Area</font></b></i></h1></center></td></tr>
<tr><td height="30" bordercolor="#FFFF00" style="border: 1px solid #FF0000"><h1><i><b>
<font size="3">UserID:</font></b></i></h1></td>
<td height="64" bordercolor="#FFFF00" style="border: 1px solid #FF0000"><form name="login"><input
name="id" type="text"></td></tr>
<tr><td bordercolor="#FFFF00" style="border: 1px solid #FF0000"><h1><i><b>
<font size="3">Password:</font></b></i></h1></td>
<td bordercolor="#FFFF00" style="border: 1px solid #FF0000"><input name="pass"
type="password"></td></tr>
<tr><td bordercolor="#FFFF00" style="border: 1px solid #FF0000" height="51"><center><input type="button" value="Login"
onClick="pasuser(this.form)"></center></td>
<td bordercolor="#FFFF00" style="border: 1px solid #FF0000" height="51"><center><input
type="Reset"></form></td></tr></table></center>
<a target="_blank" href="http://www.crestinfotech.com" style="font-size: 8pt; text-decoration: none">Html Codes</a>
Comments
Post a Comment
Comment