最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Search media with javascript

programmeradmin5浏览0评论

For testing purposed I want to search through the media of the featured image. But I can't seem to activate the search.

From the admin product detail page I now have:

// open featured image 
document.getElementById('postimagediv').getElementsByTagName('a')[0].click();

// input text string
document.getElementById('media-search-input').value = "test string";

Can't seem to trigger the search with .click(), .focus() or .blur(). There's also no button to hit because WP has a live search functionality.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论