调整<a role=""> pop up window

时间:2017-10-24 19:25:44

标签: javascript html

I updated my website, and I had to update coding way too. So now I'm facing some problems. I want to resize pop up page size.

This is the code for the menu bar for the website.

<a role="button" tabindex="0" aria-haspopup="false" data-
listposition="center" href="http://80.213.60.171:12/player.html" 
target="_blank" data-content="http://80.213.60.171:12/player.html" data-
type="external" id="comp-j95ub39f1linkElement" class="style-
j95ubfz7repeaterButtonlinkElement" data -
 reactid=".0.$SITE_ROOT.$desktop_siteRoot.$SITE_HEADER.$centeredContent. 
 $inlineC
ontent.$comp-j95ub39f.$itemsContainer.$dataItem-j95vax5x.$linkElement"<div 
 class="style-j95ubfz7repeaterButton_gapper" data-
 reactid=".0.$SITE_ROOT.$desktop_siteRoot.$SITE_HEADER.$centeredContent.

 $inlineContent.$comp-j95ub39f.$itemsContainer.$dataItem-
 j95vax5x.$linkElement.0"><div class="style-j95ubfz7repeaterButton_wrapper" 
 data-
 reactid=".0.$SITE_ROOT.$desktop_siteRoot.$SITE_HEADER.$centeredContent.
$inlineContent.$comp-j95ub39f.$itemsContainer.$dataItem-j95vax5x.

  $linkElement.0.0"><div style="text-align:center;" id="comp-j95ub39f1bg" 
class="style-j95ubfz7repeaterButtonbg" data-


    reactid=".0.$SITE_ROOT.$desktop_siteRoot.$SITE_HEADER.$centeredContent. 
   $inlineContent.$comp-j95ub39f.$itemsContainer.$dataItem-
  j95vax5x.$linkElement.0.0.$bg"><p style="text-

align: center; line-height: 44px;" id="comp-j95ub39f1label" class="style-
j95ubfz7repeaterButtonlabel" data-


   reactid=".0.$SITE_ROOT.$desktop_siteRoot.$SITE_HEADER.$centeredContent.
   $inlineContent.$comp-j95ub39f.$itemsContainer.$dataItem-
   j95vax5x.$linkElement.0.0.$bg.

    $label">SPILLER</p></div></div></div></a></li><li data-direction="ltr" 
  data-
 listposition="center" class="style-j95ubfz7repeaterButton" data-state="menu  
idle link notMobile" id="comp-j95ub39f2" data-reactid=".0.$SITE_ROOT.$desktop_siteRoot.$SITE_HEADER.$centeredContent.$inlineContent.$comp-

   j95ub39f.$itemsContainer.$dataItem-ixu55pr4" data-original-gap-between-
  text-
 and-btn="11" aria-hidden="false" style="width: 150px; height: 44px; 
position: relative; box-sizing: border-box; overflow: visible;">

I used to use this code before, but it does not help anymore:

 <script>
  function clickHandler() {
    window.open(this.href, "_blank", "width=640,height=480");
    return false; // to prevent default action.
   }

   var elems = document.querySelectorAll(".removable-parent");
  for (var i = 0, elem; elem = elems[i]; ++i) {
    elem.onclick = clickHandler;
     }
   </script>

Do you have any idea how i coud dot that?

1 个答案:

答案 0 :(得分:-1)

尝试:

document.getElementById(&#34; yourElement&#34;)。style.width =&#34; 640px&#34 ;; document.getElementById(&#34; yourElement&#34;)。style.height =&#34; 480px&#34;;

别忘了在要更改的元素(id =&#34; yourElement&#34;)中添加id。