For ads, it really doesn't make a damn bit of difference. If you use HTML, just make sure you add rel="nofollow" to the ad links so you don't bleed PageRank needlessly. And regardless of whether you use HTML or JavaScript, make sure the layout doesn't break when an ad-blocker strips out the advertisement (or if JavaScript has been disabled, stripped by a firewall, or just flat out isn't supported).
Chances are it's the HTML version. JavaScript support for cell phones and other mobile devices varies from non-existant to spotty at best depending on the make and model (and manufacturer).