2019-01-12 16:02 | 题主 | ||||||||
|
如何获取页面标题 如何获取页面标题,比如我想知道某个请求是在哪个页面操作的,可能多个页面都有同样的操作,我想知道到底是在哪个页面操作的。应该不需要自己在module的serverScript中设置变量的方式吧。 |
2019-01-14 12:23 | #1 | ||||||||
|
app.contextOwner.title为标题 |
2019-01-14 16:33 | #2 | ||||||||
|
经测试,这样不行。再帮忙看看。 var title = app.contextOwner; alert(title); 提示:undefined; var title = app.contextOwner.title; alert(title); 提示:Cannot read property 'title' of undefined |
2019-01-15 14:30 | #3 | ||||||||
|
contextOwner为上下文中指向的owner对象(ide或home中为card),肯定有效 |
2019-01-17 11:06 | #4 | ||||||||
|
应该这样写。 var title = contextOwner.title; alert(title); 前面不要加app.。 |
2019-01-17 14:34 | #5 | ||||||||
|
contextOwner.title 可以得到 名称。 标题怎么得到呢? |
2019-01-23 12:43 | #6 | ||||||||
|
contextOwner.title就是标题 |