Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7962025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:13:00+00:00 2026-06-04T05:13:00+00:00

I am using maskinput.js on an input. When I put a percent sign after

  • 0

I am using maskinput.js on an input. When I put a percent sign after the value, when loading the page, nothing is displayed. Without the percent sign, it is displayed. Can anyone let me know what is going on and how to fix it? Thank you

http://jsfiddle.net/C4CeR/1/

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> 
<title>Mask</title> 

<script src="http://code.jquery.com/jquery-latest.js"></script> 
<script src="http://yii-framework-tutorial.googlecode.com/svn-history/r3/assets/fb2a00e4/jquery.maskedinput.js" type="text/javascript"></script>

<script> 
 $(function(){$(".percent").mask("99%");});
 $(function(){$(".number").mask("99");});
</script>

</head>

<body>
 <input type="text" name="margin" class="percent" value="12" />
 <input type="text" name="number" class="number" value="12" />
</body> 
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T05:13:02+00:00Added an answer on June 4, 2026 at 5:13 am

    From what I see here, it would appear mask takes a number, and does not recognize percents as numbers.

    Solution: Don’t put a percent sign after your number. If the number is somehow generated as a percent, strip out the percent sign with something like myNumber = myNumber.split("%")[0].

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using PHP, I can convert MySQL data or static table data to csv, Excel,
Using Git Bash or MinGW Shell , if I put in a command with
Using Android TelephonyManager an application can obtain the state of data activity over the
Using PyObjC , you can use Python to write Cocoa applications for OS X.
Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button
Using Github's Issue Tracker, how can one create an issue tied to an organization
Using the current request I can get the URL hostname with: HttpContext.Current.Request.Url.Host But -
In this function, based on the value of an input, the form submit is
Using Django, how do I generate the value of a field the first time
Using Server.Transfer to show a page that informs the user that the web site

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.