Yours, Etc.: Origins and Uses of 8 Sign-Offs
late 14c., "to trick, beguile, jilt," perhaps from Old French japer "to howl, bawl, scream," of echoic origin, or from Old French gaber "to mock, deride." Phonetics suits the former, but sense the latter explanation. Took on a slang sense mid-15c. of "have sex with," and disappeared from polite usage. Revived in harmless Middle English sense of "say or do something in jest" by Scott, etc. Related: Japed; japing.
early 14c., "trick, deceit," later "a joke, a jest" (late 14c.); see jape (v.). By mid-14c. it meant "frivolous pastime," by 1400, "bawdiness."