Change Order by Clicking the Tab Key

1

I'm using bootstrap on a project in C #, and when I click the tab key to move the fields the direction is right to left, and I wanted it to be the other way around, where do I mute it? Ex: When he arrives at the save and cancel buttons he will first cancel and then save. As an example in the photo below.

    
asked by anonymous 09.12.2015 / 13:58

2 answers

3

You can pass the order of the fields in Html Helpers

@Html.TextBoxFor(model => model.Prop, new { tabindex = 1 })
    
09.12.2015 / 14:04
2

You can use the tabindex="2" attribute in HTML. Example

<!DOCTYPE html>
<html>
<body>

<a href="http://www.w3schools.com/" tabindex="2">W3Schools</a><br>
<a href="http://www.google.com/" tabindex="1">Google</a><br>
<a href="http://www.microsoft.com/" tabindex="3">Microsoft</a>

<p><b>Note:</b> Try navigating the links by using the "Tab" button on you keyboard.</p>

</body>
</html>
    
09.12.2015 / 14:05