selecting href not starting with http

using jQuery i am trying to find out all the URLS that user has entered which are not starting with http or https and finally i want to prepend http to all such URLs so that when user clicks on them they are taken to a proper site instead of broken link caused due to entry of URLs without http or https. Also like to mention that User have a field "Websites they Like" where they enter websites of their interest. So if they like stackoverflow, they may end up writing which will be considered a relative link without http. Also my requirments are such that i cant prompt user to enter http or https before there urls

以上就是selecting href not starting with http的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准