我得到了这个div ...
<div tabindex="0" class="button-base inline-block button aw-btn button-base-active">
<input type="text" tabindex="-1" style="opacity: 0; height: 1px; width: 1px; z-index: -1; overflow-x: hidden; overflow-y: hidden; position: absolute; ">
</div>
Run Code Online (Sandbox Code Playgroud)
在我的页面中间,它没有ID,我无法编辑HTML页面,我也无法使用jQuery.还试图用IE7和IE8做到这一点.
梦魇在这里:)
解决方案是document.getElementsByClassName,但不是ie7和ie8兼容.
这个div埋藏在大约10个div中,所有这些都是类似的风格,没有id等等.这个div的类是独一无二的!
我能看到的唯一解决方案是获取所有div并循环查找hasAttriutes类似.
谁有更好的主意?