I
I
ILYA542019-10-01 22:29:48
css
ILYA54, 2019-10-01 22:29:48

How to make sure that when introducing characters (string) into a converted to int, there are no errors?

5d93a8daa4be1895198009.png
5d93a8dfab802063001758.png
5d93a8e450c19851771066.png
The problem is in 40 41 44 45 lines.
I was asked the following: so that when introducing string data (string) into objects of type int, an error does not occur, but there is a conversion.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
M
maxsnw, 2018-06-09
@maxsnw

no way, even if you insert it into the option, it will not be displayed in the select, only plugins, only hardcore)

I
Ihor Bratukh, 2018-06-09
@BRAGA96

No way. The logic of such selects is to hide the standard select and draw your own on a div or ul > li. When choosing, change the custom and standard select. It is best to write a plugin with API methods (get, set ...) or use a ready-made one.

M
mShpakov, 2018-06-09
@mShpakov

No way, make it custom. The select cannot be customized since it is drawn by the OS and not by the browser.

T
tokmaganbet1, 2018-06-09
@tokmaganbet1

I apologize, out of habit, after 15 minutes of searching on Google, I'm posting a question here, I decided to make it normal labels.

F
freeExec, 2019-10-01
@ILYA54

int.TryParse()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question