The text in the input how to make what would have been introduced?

I know that there is a placeholder property of input ,but the point is that when you click ,the placeholder disappears ,and I need to make so that when you click on input ,capture it in focus, there is +7 ,as text. Please help.
March 20th 20 at 11:40
2 answers
March 20th 20 at 11:42
Solution
First, you can use plugin of jQuery Mask
Second,
<input type="text" onfocus="this.value='+7'" >
Disadvantage of this method is that all is cleaned when you re-focus. If you want to give the opportunity to only write the figures, it is possible for onkeydown to check the entered symbol and if this symbol is not a number return false, then it will not be displayed.
I'm not familiar with JQuery ,and difficult to write this should not be difficult ,I just thought that there are some properties\methods of the HTML or CSS ,well, if no ,then go write the script. - daren_Hilpert59 commented on March 20th 20 at 11:45
March 20th 20 at 11:44
Solution
<input type="text" id='make' onclick="make()" >
function make() {
var = document.getElementById('make');
var.value = "+7";
}

Find more questions by tags CSSHTML