I've found this information:
Can I go to other countries while I'm in the U.S. on a B1 or B2 Visa?
B-1 or B-2 visas: During your visit to the U.S., you may visit Canada or Mexico for up to 30 days and re-enter the U.S. as long as you re-enter within the period noted on the Form I-94 which you...