框架具有以下结构
Frames
|- about:blamk
file1.asp
|-Frames (dir)
| a.html
来自file1.asp(包含以下代码)
<html lang="en">
<head>
< ...snipped code ... >
<iframe id="upFrame" name="upFrame" onload="attachmentIFrameOnLoad(this);" src="/ics/blank.html" height="0" width="0" style="display:none"></iframe>
<table id="winTab__title" width='100%' class='winTab title'><tr><td class=winHeader><span id=title><a target="_blank" href="/link/desk/8745/31036/Ticket/123456">***Information 8475-123456: I want to get this stuff***</a></span></td></tr></table><table id=winTab__columns width='100%' class='winTab ' style='' cellpadding='0' cellspacing='0'><tr><td class='winTabOpen'> </td><td class='winTabContent'><table width='100%' cellpadding='0' cellspacing='0'><tr>
<td class='winButtonPress2' nowrap data-hoverclass="winButtonPressActive2" data-unhoverclass="winButtonPress2" onMouseUp="javascript:return false;" >
<img src='/ics/inc/css/parature/images/icons/iTicket.png' alt='My Info' border='0' class='HEIGHT:16px; WIDTH:16px;' align='absmiddle' > My Info</td>
如何提取
***Information 8475-123456: I want to get this stuff***
感谢任何帮助。
答案 0 :(得分:0)
将 $('#buttonDate').click(function () {
$('#showDate').datepicker({ onSelect:
function(dateText, inst) {
var selectedDate = $('#showDate').val();
console.log(selectedDate);
}
});
$('#showDate').datepicker('show');
});
属性添加到包含字符串的id
标记。
然后,您可以使用document.getElementById()
提取其内容:
<a>
<a id='your-id' ...>***Information 8475-123456: I want to get this stuff***</a>
如果您无法向HTML元素添加任何属性,请使用评论中指出的现有属性:
var content = document.getElementById('your-id').innerHTML;