小编Rac*_*hel的帖子

下拉列表未在IE中显示

我有5个项目的下拉列表.

我想将所选项目发送到下一个jsp页面.

JavaScript代码:

var display= document.getElementById('displayId');
var j;
var count =0;
for(j=0;j< display.options.length;j++){
   if(display.options[j].selected){
       displaySelected =  display.options[j].value;
      count++;
   }
}
alert(displaySelected);
Run Code Online (Sandbox Code Playgroud)

HTML代码:

<SELECT NAME="displayId" id="displayId" style="width:300px;">
    <option>Host</option>
    <option>Host And Response Time</option>
    <option>Host And User Count</option>
    <option>User Count And Reponse Time</option>
    <option>Host,UserCount And Response Time</option>
</SELECT>
Run Code Online (Sandbox Code Playgroud)

这适用于Fire fox,但不适用于IE ...任何人都可以找到错误吗?

javascript drop-down-menu

0
推荐指数
1
解决办法
933
查看次数

URL无法在java代码中访问

当在java代码中运行时,可从浏览器访问的URL提供404响应代码.

问题是什么???..任何人都可以解释一下这个

public String login(String url) {
        URL targetURL;
        long start = 0;
        long end = 0;
        float difference = 0;
        HttpURLConnection httpURLConnection;
        StringBuffer strbufstatus = new StringBuffer();
        try {
            //Connecting to the url
            targetURL = new URL(url);

            start = System.currentTimeMillis();

            httpURLConnection = (HttpURLConnection) targetURL.openConnection();

            httpURLConnection.setUseCaches(false);

            httpURLConnection.setAllowUserInteraction(false);

            httpURLConnection.setDoInput(true);

            httpURLConnection.setRequestMethod("GET");

            httpURLConnection.connect();

            //Getting the respond Code
            int responseCode = httpURLConnection.getResponseCode();

            strbufstatus.append("Response Code===> " + responseCode + "<br>");

            if(responseCode==200){


            // System.out.println("respondcode===> " + responseCode);

            end = System.currentTimeMillis();

            //Calculating the response time

            difference = …
Run Code Online (Sandbox Code Playgroud)

java url http

0
推荐指数
1
解决办法
1128
查看次数

标签 统计

drop-down-menu ×1

http ×1

java ×1

javascript ×1

url ×1