How can I change the default red color of the current page number of aspnetpager?

Source: Internet
Author: User

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.