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 got from www.crestinfotech.com-Coded by: Manish Wagh -->
<html>
<head></head>
<body>
<script>
var ie=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
var ns4=document.layers?1:0
var posleft=1
var idoftrembleobject="trembletext"
var trembleobject
function starttremble() {
if (ie || ns4 || ns6) {
if (ie) {
trembleobject=eval("document.all."+idoftrembleobject+".style")
}
if (ns6) {
trembleobject=idoftrembleobject
}
dotremble()
}
}
function dotremble() {
posleft*=-1
if (ie) {
trembleobject.posLeft+=posleft
}
if (ns6) {
var newpos=parseInt(document.getElementById(trembleobject).style.left)+posleft
document.getElementById(trembleobject).style.left=newpos
}
var timer=setTimeout("dotremble()",20)
}
onload=starttremble
</script>
<div id="tremblebox" style="position:relative">
<span id="trembletext" style="position:absolute;left:10px;top:30px;">
<font size=2 color=black face=Verdana>This is your shaking text</font>!
</span></div>
<br/><br/>
<br/>
<p><a target="_blank" href="http://www.crestinfotech.com/"><span style="font-size: 8pt; text-decoration: none">Manish Wagh</span></a></p>
</body>
</html>
<html>
<head></head>
<body>
<script>
var ie=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
var ns4=document.layers?1:0
var posleft=1
var idoftrembleobject="trembletext"
var trembleobject
function starttremble() {
if (ie || ns4 || ns6) {
if (ie) {
trembleobject=eval("document.all."+idoftrembleobject+".style")
}
if (ns6) {
trembleobject=idoftrembleobject
}
dotremble()
}
}
function dotremble() {
posleft*=-1
if (ie) {
trembleobject.posLeft+=posleft
}
if (ns6) {
var newpos=parseInt(document.getElementById(trembleobject).style.left)+posleft
document.getElementById(trembleobject).style.left=newpos
}
var timer=setTimeout("dotremble()",20)
}
onload=starttremble
</script>
<div id="tremblebox" style="position:relative">
<span id="trembletext" style="position:absolute;left:10px;top:30px;">
<font size=2 color=black face=Verdana>This is your shaking text</font>!
</span></div>
<br/><br/>
<br/>
<p><a target="_blank" href="http://www.crestinfotech.com/"><span style="font-size: 8pt; text-decoration: none">Manish Wagh</span></a></p>
</body>
</html>
Comments
Post a Comment
Comment