【发布时间】:2022-01-24 16:54:26
【问题描述】:
我需要从 HTML 文档中的脚本中获取 "Title" 和 "CustomerID" 的值
<script type="text/javascript">
//blablabla
if (app) {
app.value("onlineUser", {"Id":171454371,"Username":"User9007","BourseCode":"ع اط84408","CustomerId":171273228,"IsTrader":false,"IsForTest":false,"Title":"name","CanTradeForAll":false,"PasswordExpired":false,"CcmsCode":7876016,"ClubCustomerLevel":0,"PasswordSecurityWarnningMode":false,"UserSettings":[{"Key":"marketWatchColumnSettings","Value":"[]"},{"Key":"layoutModeClass","Value":""},{"Key":"showIntro","Value":"false"},{"Key":"newVersion","Value":"2.47.3"},{"Key":"helpDownloaded","Value":"true"},{"Key":"changeLayout","Value":"0"},{"Key":"closeRightBar","Value":"1"},{"Key":"openLeftBar","Value":"0"},{"Key":"selectedTheme","Value":""},{"Key":"orderInfoBoxOptionState","Value":"{\"colState\":[{\"colId\":\"0\",\"hide\":false,\"aggFunc\":null,\"width\":65,\"pivotIndex\":null,\"pinned\":\"right\",\"rowGroupIndex\":null},{\"colId\":\"DateTime\",\"hide\":false,\"aggFunc\":null,\"width\":183,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"InstrumentName\",\"hide\":false,\"aggFunc\":null,\"width\":181,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"OrderSideId\",\"hide\":false,\"aggFunc\":null,\"width\":181,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"Quantity\",\"hide\":false,\"aggFunc\":null,\"width\":181,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"TradedQuantity\",\"hide\":false,\"aggFunc\":null,\"width\":181,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"RemainingQuantity\",\"hide\":false,\"aggFunc\":null,\"width\":181,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"Price\",\"hide\":false,\"aggFunc\":null,\"width\":181,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"HeadLinePrice\",\"hide\":false,\"aggFunc\":null,\"width\":181,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"OrderState\",\"hide\":false,\"aggFunc\":null,\"width\":181,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null},{\"colId\":\"1\",\"hide\":false,\"aggFunc\":null,\"width\":90,\"pivotIndex\":null,\"pinned\":null,\"rowGroupIndex\":null}],\"sortState\":[{\"colId\":\"Price\",\"sort\":\"asc\"}]}"},{"Key":"sendOrderConfirmation","Value":"0"}],"FeatureAccess":["Hm01","Po01","Po02","Po03","Po04","Po05"],"HasShortSaleOwner":false,"PersonageTypeId":0,"IsForeign":false,"ActiveTypicalMessageIds":[],"CustomerInitialInstrumentIds":[]});
app.value("liveAsset", []);
}
//blablabla
</script>
是否可以借助 html 敏捷包?如果不是我还需要什么其他工具
【问题讨论】:
标签: javascript c# html html-agility-pack