情况: - 我创建了一个返回URL的安装设置(本地),例如: - ved.test.com,映射到IP 11.22.33.44.因此,要在安装后使Web应用程序可访问,用户必须明确地在"C:\ WINNT\system32\drivers\etc"目录下的hosts文件中创建一个条目.
方法: - 安装应用程序完成后,应用程序使用Javascript写入文件.
问题: - IE支持使用Javascript编写文件.我需要一个Firefox解决方案.使用的代码: -
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Write To A File</title>
<script language="javascript">
function WriteToFile()
{
/* The below statement is supported in IE only */
var fso = new ActiveXObject("Scripting.FileSystemObject");
var s = fso.CreateTextFile("C:\\Test.txt", true);
s.WriteLine('IE Supports Me!');
s.Close();
}
</script>
</head>
<body onLoad="WriteToFile()">
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
还提到了SO中的链接: - 如何使用JavaScript读写文件
请提供支持使用在Firefox浏览器中运行的Javascript编写文件的解决方案.
提前致谢.
情况: - 我创建了一个RadioButton组.当用户根据他的选择选择单选按钮时,将显示内容并删除其他内容.
问题: - 除了IE7之外,所有浏览器中的页面都运行良好.我需要一个在IE7中运行的解决方案.
码:-
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>IE7 Bug display:none</title>
<style>
#entireContent, #div1, #div2{
display:block;
}
</style>
<script type="text/javascript">
function displayDiv1(){
document.getElementById('div1').setAttribute('style','display:"');
document.getElementById('div2').setAttribute('style','display:none');
}
function displayDiv2(){
document.getElementById('div1').setAttribute('style','display:none');
document.getElementById('div2').setAttribute('style','display:"');
}
</script>
</head>
<body>
<div id="entireContent">
<input type="radio" name="group" value="t1" onclick="displayDiv1()">TEST 1<br>
<input type="radio" name="group" value="t2" onclick="displayDiv2()">TEST 2<br>
<div id="div1">TEST 1</div>
<div id="div2">TEST 2</div>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
参考资料: - http://www.positioniseverything.net/explorer/ienondisappearcontentbugPIE/index.htm
我尝试了资源中提供的方法,它没有用.
请帮我解决这个问题.提前致谢.
我希望在应用程序中使用内容滑块.我入围了BxSlider.请建议实现屏幕截图中显示的自定义寻呼机的方法
我指的是BxSlider API.
所需解决方案的屏幕截图
请帮忙!!