更改Html对象Zindex(Change Html Object Zindex)

   IT问题网   2021-01-20 00:00:00

问 题

大家好

我的页面中有一个对象。我希望找到一个p,这个工作在firefox和chrom但不在ie。



asp'的菜单可以找到这个对象,但其他html元素不能不要放在那个

所以我想要一个很好的解决方案。



示例:



 lt;   html  gt;  
lt; head gt;
lt; title gt; z-index lt; / title gt;
lt; script gt;
function setindex()
{
p1.style.zind ex = text1.value;
select1.style.zindex = text2.value;
getindexes();
}

function getindexes(){

text1.value = p1.style.zindex;
text2.value = select1.style.zindex;
text3.value = 5;
}
lt; / script gt;
lt; / head gt;
lt; body onload =" getindexes ()" gt;

div
lt; 输入 type =" text" =" " id = text1 名称 = text1 gt; lt; p gt;

选择
lt; 输入 类型 =" text" value =" " id = text2 name = text2 gt; lt; p gt;

iframe
lt; 输入 type =" text" value =" " id = text3 名称 = text3 gt; lt; p <跨越ss ="code-keyword">gt;
lt; 输入 type =" button" value = " 设置z-index" id = button1 name = button1 onclick =" setindex()" gt;
lt; div id = p1 名称 = p1 style =" width:200; height:200; background-颜色:lightblue;
position:absolute; left:350; top:250; z-index:"
gt; div lt; / div gt;
lt; 选择 id = select1 name = select1 style =" ; position:absolute; left:300; top:400; width = 300; z-index:"

size = 1 gt;
lt; 选项 gt; 选项1
lt; 选项 gt; option2
lt; 选项 gt; option3
lt; / select gt;
lt; object id =" iframe1" 类型 =" text / html" style =" width:100; height:115; position:absolute;剩余
:400; top:300; border-color:green; z-index:5"
gt;
lt; / object gt;
lt; / body gt;
lt; / html gt;






请帮助我

谢谢

解决方案

你应该给 jquery[ ^ ]尝试;它会将不同的dom封装到一个api中。

标签:更改对象



分享:

  • 微信
  • QQ好友
  • QQ空间
  • 新浪微博


热门推荐

GDI +中发生一般错误的问题。(problem with A generic error occurred in GDI+.)

problem hi all when i want save image from fileupload fa ...

编写非肥皂网服务(Writing Non soap web service)

problem please let me know how to write a non ...

在asp.net和c#中动态创建按钮(Dynamically created button in asp.net and c#)

problem hi, i am creating online examination ...

文件上传问题,找不到文件(File Upload problem, file not found)

problem hi, from my asp.net form, i am trying ...

请在下拉列表中解决错误(please solve error in dropdown list)

problem please solve the error i have 2 dropdownlist. in ...

更改属性上的ReadOnly属性不起作用(Change ReadOnly attribute on property doesn&#39;t work)

problem i''ve tried to change a readonly attr ...

我如何分割我的表格(how do i split my form)

problem ok i want to split my form in half so on the left ...

将templatefield动态添加到gridview(adding templatefield dynamically to gridview)

problem give the tutorial to add template field, controls ...

在c#的帮助下导出pdf文件(Export pdf File with the help of c#)

problem how to convert more then one pdf file ...

计算中间日期并在gridview中显示它(calculate inbetween date and show it in gridview)

problem hello friends, by using date time pi ...

为它的学生项目(Project for an it student)

problem hi, i m an bsc it student ,as many of you will kn ...

单击更改图标通知(Change Icon Notify on Click)

problem is possible changer notifyicon1 on click the prog ...

如果用户已经登录,则在同一浏览器中重定向到主页asp .net c#(Redirect to Home page if user already logged in, in same browser asp .net c#)

problem i want to make application that if user in logged ...

需要帮助来使用MySqlTransaction(Need help in using MySqlTransaction)

problem hi all i would like to use mysqltransaction in my ...

如何使用VBscript导航Windows注册表树(How to navigate Windows registry tree with VBscript)

problem does anyone know how to go about navigating the w ...

silverlight内存泄漏(silverlight memory leak)

problem hi, i was creating a dependencyproperty changed w ...

如何在json中获取单个元素(How to get single element in json)

problem in wcf service i am getting json response in that ...

双击文件打开程序,如何在c#中实现(double click on file opens program, how to implement in c#)

problem usually when a program in installed, you can clic ...

如何在我添加的现有数据表中添加新列,但它是bofore行的结尾(how add new column in existing datatable i added but its is come end of the bofore rows)

problem my datatable contans two columns id value ----- ...

如何在c#.net中的现有页面中打开新网址(How to open new url in existing page in c#.net)

problem hi to all, this is mdsiddiqali.i added new page n ...