Can I use an online university credit for grad school admission? I'm thinking of applying to grad school but it requires multivariable calculus and linear algebra which i did not take during my undergraduate years.

Would an online course (credit earning, such as this one) count towards this application requirement?
This sort of question can only be answered by the institution you apply to. It might require an exception to established rules, and that might be available or not. But it would probably require a person make a decision. If you try to use such a course, you probably need to give a good description of it and also something about how you interacted with it and any measurable outcome. 

If you haven't taken the course yet and are just wondering whether you should, then get advice first from the school(s) you want to apply to so that you know in advance what will happen. If they discourage it, they may have alternatives that will work for you and for them. 

If you have taken the course, then you can ask, providing the needed information.