是否有更好/更短的方法来实现这一目标? [英] Is there a better/shorter way to accomplish this?

查看:77
本文介绍了是否有更好/更短的方法来实现这一目标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用JavaScript弹出了一个音乐播放器。它使用框架将对象写入看不见的页面。


这是用户第一次看到的页面示例。


[HTML]

<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Strict // EN" " HTTP://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-strict.dtd">


< html xmlns =" http://www.w3.org/1999/xhtml"郎= QUOT;恩" xml:lang =" en">

< head>

< title>用户页< / title>

< meta http-equiv =" content-type"含量=" text / html的;字符集= ISO-8859-1" />

< script type =" text / javascript" src =" songPlayer.js">< / script>

< style type =" text / css">


* {

保证金:0;

填充:0;

颜色:#fff;

背景颜色:# 000;

}

输入{

颜色:#fff;

背景颜色:#000; < br $>
}

< / style>

< / head>

< body>

< p>

< input type =" button"的onclick = QUOT; songPlayer()" value ="音乐播放器" />

< / p>

< / body>

< / html>


[/ HTML]


这是弹出窗口的脚本。

I have made a music player in a pop up with JavaScript. It uses frames to write the object into an unseen page.

Here''s an example of the page the user first sees.

[HTML]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>User Page</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<script type="text/javascript" src="songPlayer.js"></script>
<style type="text/css">

* {
margin:0;
padding:0;
color:#fff;
background-color:#000;
}
input {
color:#fff;
background-color:#000;
}
</style>
</head>
<body>
<p>
<input type="button" onclick="songPlayer()" value="Music Player" />
</p>
</body>
</html>

[/HTML]

Here''s the script that makes the pop up.

展开 | 选择 | Wrap | 行号

推荐答案

第一步可能是使用数组。


其次,为什么不编写HTML和只是用JavaScript更改属性?
The first step could be to use arrays.

Secondly, why not have the HTML already written and just change the properties with JavaScript?



第一步可能是使用数组。


其次,w hy没有已编写的HTML,只是用JavaScript更改属性?
The first step could be to use arrays.

Secondly, why not have the HTML already written and just change the properties with JavaScript?



你能提供一个使用数组的例子吗。


也是为了我的生活,我不能记得如何改变属性。大约2个月的感觉我甚至试图用它做任何事情。


谢谢,死亡

Could you provide an example of using arrays for this.

Also for the life of me I can''t remember how to change properties. It''s been about 2 months sense i''ve even tried to do anything with it.

Thanks, Death


TBP **可能是
展开 | 选择 | Wrap | 行号


这篇关于是否有更好/更短的方法来实现这一目标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆