Aspnetpager has always been my favorite paging control (and the author has recently released a version of http://mvcpager.codeplex.com/specifically for MVC), by default after running like
I personally think it looks pretty nice, but yesterday I met a customer whose website background is black. I think the current red page number is poor, and I want to change it to a "green" with a relatively high contrast ", at the same time, I am too lazy to try all the attributes of aspnetpager one by one. Let's take a look at the final generatedSource code
Color: Red is directly written in the span tag using an inline style. The idea is: Use js to directly select the span and replace the color value in the style.
<SCRIPT type = "text/JavaScript" src = "scripts/jquery-1.4.1.min.js"> </SCRIPT> <SCRIPT type = "text/JavaScript"> $ (). ready (function () {var OBJ =$ ("# <% = aspnetpager1.clientid %> span"); obj. get (0 ). style. color = "00ff00" ;}) </SCRIPT>
Does not move one line in the backgroundCode, Close the job!