Home  >  Article  >  Web Front-end  >  Use javascript to split and extract the required content of the page_javascript skills

Use javascript to split and extract the required content of the page_javascript skills

WBOY
WBOYOriginal
2016-05-16 19:13:401173browse

nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



文档









<script> <BR>function getcontent(){ <BR> var str=document.getElementById("xxx").value; <BR> document.getElementById("aaa").value=str.match(/<KBD.+?title=["']?(.+?)[ '">]/i)[1]; <BR> document.getElementById("bbb").value=str.match(/<KBD.+?>((?:.|\n)+?)<\/KBD>/i)[1]; <BR>} <BR></script>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn