摘要:View Code <script type="text/livescript"> function GetTrainAndStudentName() { var strValue=document.getElementById("divp").innerText; var v1 = "教练员:"; var v2 = "学员:"; var _strValue = strValue; alert(_strValue.indexOf("教练员:")); v...
阅读全文
摘要:1.delphi 调用js,触发就是方法:var win: IHTMLWindow2;beginwin := IHTMLDocument2(wbmap.Document).parentWindow;Win.execScript('addAllPoits(' + QuotedStr(strValue) + ')', 'javascript');end;addAllPoits:js的方法strValue:方法参数;'javascript':脚本语言;2.js页面操作触发delphi程序写的方法,主要原理是:修改window.exter
阅读全文
摘要:Edit1.text := ((wbmap.document as IHTMLDocument2).all.item('tname', 0) as ihtmlinputelement).valuedit1.text:= wbmap.OleObject.document.getElementByID('tname').value;wbmap:webbrowser;tname:网页标签ID名;
阅读全文