d
Amit DhamuSoftware Engineer
 

On The Fly Form With jQuery

1 minute read 00000 views
$(document).ready(function () {
  var form = $('<form>', {
    action: 'http://www.google.com/search',
    target: '_blank',
  }).append(
    $('<input>', {
      name: 'q',
      value: 'jquery rocks',
      type: 'hidden',
    })
  )
  form.submit()
})

Credit