问题标签 [object-tag]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
4 回答
14322 浏览

image - 包含图像是否有效 instead of ?

Inspired by this question, where the poster casually states as fact that <object> should be used instead of <img>

Inspired by this question, where the poster casually states as fact that <object> should be used instead of <img> to embed images in HTML documents.

I'm developing a web app at the moment, and, being a perfectionist, I try to make it all shiny and compliant with all the standards. As far as I know, the <img> tag is to be deprecated in the upcoming standards for xHTML, and as nowadays even IE is able to handle <object> properly, I wanted to use the <object> tag for all the images on my site

It became clear that the "upcoming standards" the poster was talking about was the abandoned XHTML2 spec, which didn't even formally deprecate <img> anyway. (Although there were apparently rumors to that effect.)

To the best of my knowledge, I've not seen anyone in the web development community advocating for the usage of the general-purpose <object> tag over the arguably more semantic and definitely more compatible <img> tag.

Is there a good reason to use <object> instead of <img>? Should <object> even be used at all in place of <img> – what might this break?


Download FTP directory contents to ios

I have a website, let's say it's "http://www.jwilkthings.com/stuff"

I have a bunch of .txt files stored on this website, i.e. "http://www.jwilkthings.com/stuff/text1.txt"

What I'm wanting to do is find a way in iOS to download all of those text files without knowing what the document name is. I can already retrieve them manually as long as I have a file name, but I would rather just get all of them at once and put them in the documents directory if possible. I currently use FileZilla to upload all of the text files, so I can use FTP if needed.

0 投票
1 回答
3258 浏览

html - 让嵌入式 flowplayer 播放本地视频文件

我嵌入flowplayer使用html page以下<object标签。它成功地从他们的网站播放提到的视频(即来自 urlhttp://stream.flowplayer.org/KimAronson-TwentySeconds1318.flv

但是,我想从本地文件系统播放视频。说/home/me/videos/test.flv

在这种情况下,我该如何提及 url?我应该提供什么baseurl ,url价值?

0 投票
1 回答
5782 浏览

html - 拉伸和调整 html 对象的大小以适应?

我正在制作一个页面,旨在同时显示 4 个对象。这些对象将流式传输实时视频,并在单击主菜单中的项目时动态分配。我需要的是帮助自动调整页面上所有内容的大小,以便在不滚动的情况下尽可能地拉伸。

在此处输入图像描述

黑盒子是页面。顶部的标题框始终具有相同的高度,左侧的框始终具有相同的宽度。然而,绿色框需要自动调整大小以尽可能适合,并且所有 4 个大小相同。除主菜单外,任何地方都不应有滚动条。

最重要的是,当内容框调整大小时,对象也需要调整大小。我在 IE 中看到了“100%”宽度的对象无法正常工作的问题。

我如何构建这个页面来做到这一点?我对 HTML 还是很陌生,不知道如何设置它来调整大小。这是我到目前为止的代码:

更新

在尝试了安娜的使用答案后,display: table;我得到了更好的展示,但它现在仍然填补了所有空间。该页面还取决于主 div 的高度为 800 px,我需要将其设置为 100% - 由于标题 div,我无法弄清楚该怎么做,并且由于主菜单的宽度存在同样的问题. 那么 IA)如何确保页面在没有滚动条的情况下正确拉伸,以及 B)如何用它们的内容填充每个框?

[PS - 在这个新代码中将有一个图像找不到,现在是 3x3 而不是 2x2]

这就是它现在的样子,我在它需要移动的地方画了线......

在此处输入图像描述

0 投票
1 回答
1333 浏览

javascript - 用于 youtube 视频的 IE8 上的 pauseVideo() 给出“对象不支持此属性或方法”

当尝试在 IE8 上为 youtube 视频使用 pauseVideo() 时,它给了我“对象不支持此属性或方法”,

这是我的嵌入式视频:

这是电话:

该代码在 Firefox 和 chrome 中运行良好,但在 $(this).get(0).pauseVideo(); 行中给出了 IE8 上的“对象不支持此属性或方法”;

0 投票
1 回答
220 浏览

quicktime - 无法在动态创建的 Object 标签中播放 QT

我正在尝试通过动态创建 OBJECT 标记来让 Quicktime 插件播放 rtsp 流。我的页面包含一个带有事件处理程序的网格,用于捕获行单击事件以生成标记。Quicktime 徽标出现,但不播放。然而,当我在表格中对代码段进行硬编码时,流就会播放。有没有办法让 QT 播放流媒体?

提前致谢。

0 投票
1 回答
1313 浏览

html - 锚链接在对象标签中不起作用

new here 并且对象标签有问题。

我有一个嵌入在标签中的页面,它类似于传统的常见问题解答页面,因为我在顶部有一个链接列表,单击时应该跳转到每个部分的锚标记。

当单独加载外部页面时它可以完美运行,但是如果页面加载到对象标签中,则单击链接时不会发生任何事情。

我已经尝试了从 href="#name" 到 href="http://www.blah.com/blah.html#name" 的所有方法,但它仍然无法正常工作。

有任何想法吗?

0 投票
2 回答
3473 浏览

java - 下载哪个插件以在谷歌浏览器上显示 java 小程序

我最近在显示一个 java 小程序时遇到了一些问题。终于,有些东西显示出来了。但它不是一个小程序。这是一个小盒子,我的小程序的宽度和高度,要求显示小程序所需的插件。我正在使用谷歌浏览器。我需要哪个插件?

0 投票
0 回答
358 浏览

javascript - Internet Explorer 在 contentEditable 模式下向对象元素添加重复的参数标签

在 Intenet Explorer (9 版本) 中存在以下问题:浏览器向对象元素添加了额外的参数标签。它在 element.innerHTML 中可见。我的代码保存了生成的 html,并且在下一次渲染时我得到了更大的 html。在所有随后的保存中,它会变得更大,这会导致问题

初始html:

变大是这样的:

0 投票
1 回答
6246 浏览

jquery - jQuery SVG-object 标签加载事件

我有一个通过 jQuery 将 SVG 动态添加到页面的页面:

我需要访问 SVG 文档(将变量“推送”到 svg 脚本上下文中),但必须为此加载 SVG。我的问题是我没有让加载事件工作。不显示警报。

怎么做?

编辑:似乎 jQuery 只是阻止将“加载”事件绑定到非图像或文档元素,所以我只使用“官方”addEventListener() 函数(愚蠢的 IE 不支持,但这没问题为了我):

0 投票
1 回答
1567 浏览

html - 无法使用将 csv 文件中的数据获取到 html 中

I have tried the following code to get the data from csv file to html page,but I am not getting the values.here is my code.

In table.html file,

  <html>
<head><tit

I have tried the following code to get the data from csv file to html page,but I am not getting the values.here is my code.

In table.html file,

In data.csv file,

It is not working for .txt file also.


To load data from spreadsheet (Excel or OpenOffice Calc) into postgreSQL:

Save the spreadsheet page as a CSV file. Prefered method is to open the spreadsheet on OpenOffice Calc and do the saving. On “Export to text file” window choose Character Set as Unicode (UTF8), Field Delimiter: “,” and Text Delimiter “ “ “. Message will be displayed saying only active sheet is saved. Note: This file has to be saved on a folder but not on desktop and have to save in UTF8 format (postgreSQL by dafault is step up for UTF8 encoding). If saved on desktop, postgreSQL will give “access denied” message and won't upload.

In PostgreSQL, create an empty table with same number of column as the spreadsheet.

Note: On each column, column-name has to be same, data type has to be same. Also, keep in mind the length of data where character varying with enough field.

Then on postgreSQL, on SQL window, put the code:

copy "ABC"."def" from E'C:\\tmp\\blabla.csv' delimiters ',' CSV HEADER;

NOTE: Here C:\\tmp is the folder where CSV-file “blabla” is saved. “ABC”.”def” is the table created on postgreSQL where "ABC" is schema and"def" is the actual table. Then do “execute query” by pressing the green button on top. “CSV HEADER” is needed when CSV table has heading at the start of every column.

If everythig is ok, no error message will be displayed and table data from CSV file will be loaded into the postgreSQL table. But if there is an error message do as following:

If error message is saying that the data is too long for a specific column, then increase the column size. This happens mostly on character and character varying column. Then run the “execute query” command again.

If error message is saying that the data type doesn't match to a particular column, then change the data type on postgreSQL table-column to match the one in CSV table.

In your case, after creating CSV file, delete the unwanted columns and match the columns in postgre table.