2012-06-22 63 views
0

我有一個網絡應用程序,我用於工業目的。這是一個現成的商業應用程序。自動登錄未驗證

<html> 

<title>Login Page</title> 

<body> 

<form id="loginForm" method="post" name='login' action="http://localhost/_common/lvl5/main.jsp?wbs=527&operatorlocale=en" onsubmit="document.getElementById('pass').value = CJMaker.makeString(document.getElementById('pass').value);" > 

<input id="nameInput" type="text" value="Administrator" name="name" size="25" maxlength="80" tabindex="1" style="width:175px;"> 

<input type="password" value="mhoto0606" id="pass" name="pass" autocomplete="off" size="25" maxlength="80" tabindex="1" style="width:175px; "> 

</form> 

<script> 
document.getElementById('loginForm').submit(); 
</script> 

</body> 
</html> 

但是,當我嘗試連接到Web應用程序進行遠程,它給我的錯誤,使得「登錄:當Web服務器在自己的電腦上運行,我可以成功地與下面的HTML代碼登錄到Web應用程序自動未經認證「。爲此,我使用下面的代碼。唯一不同的是在「action」屬性中指定的地址。這次我使用服務器的IP地址而不是「本地主機」

<html> 

<title>Login Page</title> 

<body> 

<form id="loginForm" method="post" name='login' action="http://###.##.##.##/_common/lvl5/main.jsp?wbs=527&operatorlocale=en" onsubmit="document.getElementById('pass').value = CJMaker.makeString(document.getElementById('pass').value);" > 

<input id="nameInput" type="text" value="Administrator" name="name" size="25" maxlength="80" tabindex="1" style="width:175px;"> 

<input type="password" value="mhoto0606" id="pass" name="pass" autocomplete="off" size="25" maxlength="80" tabindex="1" style="width:175px; "> 

</form> 

<script> 
document.getElementById('loginForm').submit(); 
</script> 

</body> 
</html> 

這個網絡應用只適用於Internet Explorer。

我無法想出一個解決方案。我急切地等待你的建議。

在此先感謝。

回答

0

你真的在HTML中存儲憑據嗎?你在安全方面犯了一個大錯誤。你不應該這樣做。我希望你知道你在做什麼!

+0

是的,我知道我在做什麼。這並不重要。因爲這個html只會存儲在我的comp中。我計劃使用一些編程技巧來使它更安全! – Shansal