首页 \ 问答 \ Firefox:标签属性在html解析后严重重新排序(Firefox: tag attributes badly reordered after html parse)

Firefox:标签属性在html解析后严重重新排序(Firefox: tag attributes badly reordered after html parse)

HTML代码:

<input id="txtSizeBeforeValue" type="text" size="5" value="blabla">
<input id="txtValueBeforeSize" type="text" value="blabla" size="5">

HTML解析代码:

<input id="txtSizeBeforeValue" type="text" value="blabla" size="5">
<input id="txtValueBeforeSize" type="text" size="5" value="blabla">

在这里你可以看到Firefox HTML解析器存在一个问题,标签属性与每个HTML标签(如输入文本/按钮,textarea,canvas)严重重新排序......即使您编写标签属性(如重新排序),也会重新排序。 这个问题在Firebug和Firefox的HTML分析开发人员工具中可见,因此它不能成为Firebug问题。 由于HTML解析器不会重新排序标记属性,因此Google Chrome没有任何问题。

你也有这个问题吗? 在每个平台上?


HTML code:

<input id="txtSizeBeforeValue" type="text" size="5" value="blabla">
<input id="txtValueBeforeSize" type="text" value="blabla" size="5">

HTML parsed code:

<input id="txtSizeBeforeValue" type="text" value="blabla" size="5">
<input id="txtValueBeforeSize" type="text" size="5" value="blabla">

Here you can see there is an issue with Firefox HTML parser, tag attributes are badly reordered with every HTML tag like input text/button, textarea, canvas... Even if you write tag attributes like it is reordered, it is reordered again. The problem is visible in Firebug and the HTML analyse developer tool of Firefox so it can't be a Firebug issue. No problem with Google Chrome since the HTML parser doesn't reorder tag attributes.

Do you have this issue with Firefox too? On every platform?


原文:https://stackoverflow.com/questions/9227517
更新时间:2023-12-12 20:12

最满意答案

似乎是一个很好的方法来做到这一点。 我以类似的方式做到这一点,除了我将所有内容保存在数据文件夹中,即sdcard/data/{packagename}

更新:

你不应该这样做。 请改用Environment.getDataDirectory()


Seems like a pretty good way to do it. I do it in a similar way, except I keep everything in the data folder, i.e. sdcard/data/{packagename}.

Update:

You shouldn't do it like that. Use Environment.getDataDirectory() instead.

相关问答

更多
  • 不要把媒体文件放在res/ 将你的文件(temp.wav)放在一个名为/ sdcard / audio的文件夹中(如果你正在使用模拟器)。 并做到这一点: mp.setDataSource("/sdcard/audio/temp.wav"); dont put the media files inside res/ Put your files(temp.wav) in a folder named /sdcard/audio(if you are using an emulator). and do t ...
  • 似乎是一个很好的方法来做到这一点。 我以类似的方式做到这一点,除了我将所有内容保存在数据文件夹中,即sdcard/data/{packagename} 。 更新: 你不应该这样做。 请改用Environment.getDataDirectory() 。 Seems like a pretty good way to do it. I do it in a similar way, except I keep everything in the data folder, i.e. sdcard/data/{p ...
  • 得到它了。 确保将所有文件放在名为com.mopub.mobileads的文件夹中,然后将此文件夹拖放到Android Studio项目侧栏的/ src / main内的java文件夹下。 Got it. Make sure you have all the files in a folder called com.mopub.mobileads and then simply drag and drop this folder under the java folder inside /src/main ...
  • 您可以使用这些文本创建自定义视图并将该自定义视图添加到另一个布局中: public class CustomView extends RelativeLayout implements View.OnClickListener{ public TextView ClassName, Room, StartingTime, EndingTime; public float Size; public RelativeLayout mContainer; // constructor public Custo ...
  • 这取决于用户是否需要直接编辑文件。 如果没有,您应该将它们放在%APPDATA%中,您可以通过以下方式访问它: Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) 否则,您可以将它放在我的文档中: Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) 无论哪种方式,将它放在Program Files中都不是一个好主意。 正如您所发现的那样,即使 ...
  • 我想说,不可能修改传感器管理器提供的传感器集 - 它是一个带有硬编码传感器类型的系统服务。 如果您提供了一个Android服务,而不是提供这些传感器读数,那么这可能是最好的,然后可供任何需要它们的应用程序使用。 这项服务可能会将附件devkit api包装成与您的设备进行实际通信。 您将从中派生出来的服务基类,包括示例: I would say that it's not possible to modify the set of sensors provided by the sensor manager ...
  • 要自定义键盘,您需要修改xml文件夹中的“qwerty”和布局文件夹中的键盘。 我将展示一些例子: 这将在布局文件夹中进行
    我自己找到了解决方案。 它适用于File类的java方法,但你必须在实际创建文件后调用它们,这在我看来并不简单,因为我希望它能像设置一些属性一样工作,然后用这些指定实际创建文件属性。 以下是为特定文件的每个人设置读/写/执行权限的示例: File file = new File("logs/log.txt"); file.createNewFile(); file.setWritable(true, false); file.setReadable(true, false); file.setExecuta ...
  • 创建您的布局如下:
  • 这是我的函数,它采用位图并将其保存在目录中... public void saveBitmap(Bitmap bitmap) { if (createDirIfNotExists("TestApp")) { String filePath = Environment.getExternalStorageDirectory() + File.separator + "TestApp/TestSC" + date_value + "_" + time_ ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。