var height = $("#divOne").height();
How to remove first number from height variable?
for example if height of this element is 118 I want to be 18.
Try this :
var height = $("#divOne").height().toString();
height = height.substring(1,height.length);
First convert it into string then use the substring function.
var height = $("#divOne").height();
height = (height.toString()).substring(1);
Just take the remainder from 100.
var height = $("#divOne").height();
height = height%100;
console.log(height);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.