Reputation:
i have:
<input type="text" />
i want to turn off predictive text using Javascript or any code automatically without need to go to settings and turn it off, so any one can help me ?
Upvotes: 3
Views: 5607
Reputation: 95589
This doesn't exactly answer your question, but HTML5 introduces a bunch of new input types such as "email", "url", "search", etc. Using the best semantic "type" and then allowing the platform to make the decision of how to handle that type is generally better practice than changing the behavior of the input type in a way that will be inconsistent with how the platform generally handles that kind of input.
Upvotes: 0
Reputation: 14659
Using jQuery you can do something like this:
// using a JavaScript object literal to change multiple attributes at once:
$(document).find('input')
.attr({
autocorrect: 'off',
autocapitalize: 'off'
});
Upvotes: -1
Reputation: 6666
I've experienced this as well.
Try this
<input type="text" name="some_name" autocorrect="off">
Upvotes: 4