Archive for the ‘Javascript’ Category

<script type=”text/javascript”> function addRowTable() { $(“#myTable > tbody”).append(“<tr><td>row content</td></tr>”); } function removeRowTable(rowId) { if(confirm(“Are you sure to delete this item?”)){ $(“#”+rowId).remove(); } } </script> <table id=”myTable”> <thead><th>head1</th></thead> <tbody></tbody> </table> <input type=”button” name=”addtolist” value=”Add To List” onclick=”addRowTable()”>

Nice and Interactive Chart With Yii Extensions http://www.highcharts.com/demo/   For Yii extensions: http://www.yiiframework.com/extension/highcharts/

Javascript:: Replace string or space

Posted: September 28, 2010 in Javascript

var course = “The Style And CSS”; var rep_course = course.replace(/ /g, “-”); //replace all space with -