Javascript Sweet Alert and html link inside text

后端 未结 5 1622
暖寄归人
暖寄归人 2021-01-25 10:46

i have the following SweetAlert Code..



        
5条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-25 11:23

    Found this answer here, all credits to Tristan Edwards

    const el = document.createElement('div')
    el.innerHTML = "Here's a link"
    
    swal({
      title: "Hello!",
      content: el,
    })
    

提交回复
热议问题